This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mathcomp Require Import all_ssreflect. | |
Inductive tree := branch : seq tree -> tree. | |
Fixpoint size (t : tree) := | |
let: branch ts := t in | |
(fix size_rec ts := | |
if ts is t :: ts then | |
size t + size_rec ts | |
else 1) ts. |
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq choice. | |
From mathcomp Require Import fintype path tuple finfun bigop finset order. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
Section EqSeq. | |
Variables (T : eqType). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import all_ssreflect. | |
Section cat. | |
Variable (A : Type). | |
Lemma catIr : right_injective (@cat A). | |
Proof. by elim => //= ? ? IH ? ? [] /IH. Qed. | |
Lemma catIl : left_injective (@cat A). | |
Proof. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section from_ssrfun. | |
Local Set Implicit Arguments. | |
Local Unset Strict Implicit. | |
Local Unset Printing Implicit Defensive. | |
Variables S T R : Type. | |
Definition left_inverse e inv (op : S -> T -> R) := forall x, op (inv x) x = e. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mathcomp Require Import ssreflect fintype finset seq ssrbool. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
(****************************************************************************** | |
Coq/SSReflect formalization of the proof of 'f# ↘ (f∪g)# = f# \ (f∪g)#'. | |
Checked with Coq 8.8.0 and MathComp 1.7.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import all_ssreflect all_algebra. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
Section Perm. | |
Variable (A : eqType) (le : A -> A -> bool). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import all_ssreflect. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Unset Printing Implicit Defensive. | |
Fixpoint vec (n : nat) (A : Type) : Type := | |
if n is n'.+1 then A * vec n' A else unit. | |
Fixpoint vcat (n m : nat) (A : Type) : vec n A -> vec m A -> vec (n + m) A := |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
以下は Lecture 1: Algebraic Effects I (Gordon Plotkin) - Exercise 5 の解である。 | |
http://cs.ioc.ee/ewscs/2015/plotkin/plotkin-slides-exercises1.pdf | |
p. 31 の等式理論 BoolState より、いかなる式に対しても | |
read(write_b1(x), write_b2(y)) (x, yは変数) | |
という形の normal form が自然に与えられる。 | |
以下のように、2つの異なる normal form に関する等式を仮定する: | |
read(write_b1(x), write_b2(y)) = read(write_b1'(x'), write_b2'(y')) (b1 ≠ b1' ∨ x ≠ x' ∨ b2 ≠ b2' ∨ y ≠ y') |
NewerOlder