- collective predicate
x \in P
- applicative predicate
P x
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
Set Printing Coercions. | |
Require Import Omega. | |
Inductive hoge (n:nat) : Type := | |
| fuga (m:nat) : m < n -> hoge n. | |
Coercion nat_of_hoge {n:nat} (h : hoge n) := | |
match h with | |
| fuga _ n _ => n | |
end. |
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
Definition set (M : Type) := M -> Prop. | |
Definition belongs {M : Type} (x : M) (P : set M) : Prop := P x. | |
Arguments belongs {M} x P /. | |
Definition map {M M' : Type} f (A : set M) (B : set M') := | |
forall x, belongs x A -> belongs (f x) B. | |
Arguments map {M M'} f A B /. | |
Class group (M : Type) := { | |
cset : set M; |
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
Definition gen_rel (X Y : Type) := X -> Y -> Prop. | |
Definition map_rel {X Y : Type} (R : gen_rel X Y) := | |
forall x x', x = x' -> forall y y', R x y -> R x' y' -> y = y'. | |
Arguments map_rel {X Y} R/. | |
Definition map_rel' {X Y : Type} (R : gen_rel X Y) := | |
forall x, exists! y, R x y. | |
Arguments map_rel' {X Y} R/. |
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
Definition relation (X Y : Type) := X -> Y -> Prop. | |
Structure map X Y := { | |
R : relation X Y; | |
map_law : forall x, exists! y, R x y | |
}. | |
Definition is_map {X Y : Type} (R : relation X Y) := | |
forall x, exists! y, R x y. |
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
Structure group M := { | |
id : M; | |
bin : M -> M -> M; | |
inverse : M -> M; | |
assoc : forall x y z, bin x (bin y z) = bin (bin x y) z; | |
idR : forall g, bin g id = g; | |
idL : forall g, bin id g = g; | |
invR : forall g, bin g (inverse g) = id; | |
invL : forall g, bin (inverse g) g = id | |
}. |
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
Definition set (M : Type) := M -> Prop. | |
Definition belongs {M : Type} (x : M) (P : set M) : Prop := P x. | |
Definition subset {M : Type} (S T : set M) := | |
forall s, belongs s S -> belongs s T. | |
Definition id {M : Type} (S : set M) (id : M) (bin : M -> M -> M) := | |
forall s, belongs s S -> bin s id = s /\ bin id s = s. | |
Definition identity {M : Type} (S : set M) (bin : M -> M -> M) := | |
exists e, id S e bin. |
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
Definition set (M : Type) := M -> Prop. | |
Definition belongs {M : Type} (x : M) (P : set M) : Prop := P x. | |
Definition subset {M : Type} (S T : set M) := | |
forall s, belongs s S -> belongs s T. | |
Definition id {M : Type} (S : set M) (id : M) (bin : M -> M -> M) := | |
forall s, belongs s S -> bin s id = s /\ bin id s = s. | |
Axiom id_belongs : forall {M : Type} (S : set M) (id_ : M) bin, | |
id S id_ bin -> belongs id_ S. |