statement
stringlengths
1
1.02k
proof
stringlengths
0
5.19k
type
stringclasses
13 values
symbolic_name
stringlengths
1
30
library
stringclasses
15 values
filename
stringclasses
117 values
imports
listlengths
0
16
deps
listlengths
0
16
docstring
stringclasses
50 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
neg_eqv {T} {E:Eqv T} (x:T) (y:T) : Prop
:= not (eqv x y).
Definition
neg_eqv
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "Eqv" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
EqvWF T
:= { eqvWFEqv : Eqv T ; eqvWFEquivalence : Equivalence eqv }.
Class
EqvWF
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "Eqv" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
EqvWF_Build {T} {E:Eqv T} {EV:Equivalence eqv} : EqvWF T
:= { eqvWFEqv := E ; eqvWFEquivalence := EV }.
Instance
EqvWF_Build
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "Eqv", "EqvWF" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
eqv_dec {T} {E:Eqv T} {R:RelDec eqv}
:= rel_dec.
Definition
eqv_dec
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "Eqv", "RelDec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_eqv_dec {T} {E:Eqv T} {R:RelDec eqv} x y
:= negb (rel_dec x y).
Definition
neg_eqv_dec
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "Eqv", "RelDec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
eqv_dec_p (x:T) (y:T) : {eqv x y} + {~eqv x y}
:= rel_dec_p x y.
Definition
eqv_dec_p
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_eqv_dec_p (x:T) (y:T) : {~eqv x y} + {eqv x y}
:= neg_rel_dec_p x y.
Definition
neg_eqv_dec_p
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "neg_rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
injection_eqv_equivalence : Equivalence (eqv (T:=U)).
Proof. repeat constructor ; unfold Reflexive ; unfold Symmetric ; unfold Transitive ; intros. apply injResp. reflexivity. apply injResp. apply injResp in H. symmetry. auto. apply injResp. apply injResp in H. apply injResp in H0. transitivity (inj y) ; auto. Qed.
Definition
injection_eqv_equivalence
Programming
theories/Programming/Eqv.v
[ "Equivalence", "ExtLib.Core.RelDec", "EqvNotation" ]
[ "apply" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f $ x"
:= (f x) (at level 99, x at level 99, right associativity, only parsing).
Notation
f $ x
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"'begin' e1 'end'"
:= ((e1)) (at level 0, only parsing).
Notation
'begin' e1 'end'
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_uncurry A B C (f:A -> B -> C) (x:A * B) : C
:= let (a,b) := x in f a b.
Definition
deprecated_uncurry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
uncurry
:= deprecated_uncurry.
Notation
uncurry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_uncurry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_curry {A B C} (f : A * B -> C) (a : A) (b : B) : C
:= f (a, b).
Definition
deprecated_curry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
curry
:= deprecated_curry.
Notation
curry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_curry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_uncurry_curry : forall A B C (f : A -> B -> C) a b, curry (uncurry f) a b = f a b.
Proof. unfold curry, uncurry. reflexivity. Qed.
Lemma
deprecated_uncurry_curry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "curry", "uncurry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
uncurry_curry
:= deprecated_uncurry_curry.
Notation
uncurry_curry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_uncurry_curry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_curry_uncurry : forall A B C (f : A * B -> C) ab, uncurry (curry f) ab = f ab.
Proof. unfold uncurry, curry. destruct ab. reflexivity. Qed.
Lemma
deprecated_curry_uncurry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "curry", "uncurry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
curry_uncurry
:= deprecated_curry_uncurry.
Notation
curry_uncurry
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_curry_uncurry" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_zip A B (xs:list A) (ys:list B) : list (A * B)
:= match xs, ys with | [], _ => [] | _, [] => [] | x::xs, y::ys => (x,y)::deprecated_zip xs ys end .
Fixpoint
deprecated_zip
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
zip
:= deprecated_zip.
Notation
zip
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_zip" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
deprecated_unzip A B (xys:list (A * B)) : list A * list B
:= match xys with | [] => ([], []) | (x,y)::xys => let (xs,ys) := deprecated_unzip xys in (x::xs,y::ys) end.
Fixpoint
deprecated_unzip
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
unzip
:= deprecated_unzip.
Notation
unzip
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "deprecated_unzip" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
sum_tot {A} (x:A + A) : A
:= match x with inl a => a | inr a => a end.
Definition
sum_tot
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
forEach A B (xs:list A) (f:A -> B) : list B
:= map f xs.
Definition
forEach
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lsingleton {A} (x:A) : list A
:= [x].
Definition
lsingleton
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
firstf {A B C} (f:A->C) (xy:A*B) : C*B
:= let (x,y) := xy in (f x, y).
Definition
firstf
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
secondf {A B C} (f:B->C) (xy:A*B) : A*C
:= let (x,y) := xy in (x, f y).
Definition
secondf
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
update {K V} {kRealDec:RelDec (@eq K)} x v l : list (K * V)
:= match l with | [] => [(x,v)] | (y,w)::l' => if eq_dec x y then (x,v)::l' else (y,w)::update x v l' end.
Fixpoint
update
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "RelDec", "eq_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
updateMany {K V} {kRealDec:RelDec (@eq K)} (ups:list (K * V)) (init:list (K * V)) : list (K * V)
:= fold_right (uncurry update) init ups.
Definition
updateMany
Programming
theories/Programming/Extras.v
[ "List", "String", "ExtLib.Structures.Monads", "ExtLib.Core.RelDec", "MonadNotation", "ListNotations", "FunNotation" ]
[ "RelDec", "fold_right", "uncurry", "update" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Injection (x : Type) (t : Type)
:= inject : x -> t.
Class
Injection
Programming
theories/Programming/Injection.v
[ "Coq.Strings.Ascii", "Coq.Strings.String" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Injection_refl {T : Type} : Injection T T
:= { inject := @id T }.
Instance
Injection_refl
Programming
theories/Programming/Injection.v
[ "Coq.Strings.Ascii", "Coq.Strings.String" ]
[ "Injection" ]
Class Projection x t := { project : t -> x ; pmodify : (x -> x) -> (t -> t) }.
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Injection_ascii_string : Injection ascii string
:= { inject a := String a EmptyString }.
Instance
Injection_ascii_string
Programming
theories/Programming/Injection.v
[ "Coq.Strings.Ascii", "Coq.Strings.String" ]
[ "Injection" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Injection_ascii_string_cons : Injection ascii (string -> string)
:= { inject := String }.
Instance
Injection_ascii_string_cons
Programming
theories/Programming/Injection.v
[ "Coq.Strings.Ascii", "Coq.Strings.String" ]
[ "Injection" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Lte T
:= { lte : T -> T -> Prop }.
Class
Lte
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lte {T} {L:Lte T} (x:T) (y:T) : Prop
:= not (lte x y).
Definition
neg_lte
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lt {T} {L:Lte T} x y
:= lte x y /\ ~lte y x.
Definition
lt
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lt {T} {L:Lte T} x y
:= not (lt x y).
Definition
neg_lt
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lt_RelDec {T} {L:Lte T} {RD:RelDec lte} : RelDec lt
:= { rel_dec x y := (rel_dec x y && negb (rel_dec y x))%bool }.
Instance
lt_RelDec
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec", "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lt_RelDecCorrect {T} {L:Lte T} {RD:RelDec lte} {RDC:RelDec_Correct RD} : RelDec_Correct lt_RelDec.
Proof. constructor. intros ; constructor ; intros. unfold rel_dec in H. simpl in H. apply andb_true_iff in H. destruct H. unfold lt. constructor. apply rel_dec_correct. auto. apply neg_rel_dec_correct. simpl in H0. apply negb_true_iff in H0. auto. unfold lt in H. destruct H. unfold rel_dec. simpl. app...
Instance
lt_RelDecCorrect
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec", "RelDec_Correct", "apply", "lt", "lt_RelDec", "neg_rel_dec_correct" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
LteWF T
:= { lteWFLte : Lte T ; lteWFPreOrder : PreOrder lte }.
Class
LteWF
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
LteWF_Build {T} {L:Lte T} {PO:PreOrder lte} : LteWF T
:= { lteWFLte := L ; lteWFPreOrder := PO }.
Instance
LteWF_Build
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "LteWF" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lte_dec {T} {L:Lte T} {R:RelDec lte}
:= rel_dec.
Definition
lte_dec
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lte_dec {T} {L:Lte T} {R:RelDec lte} x y
:= negb (lte_dec x y).
Definition
neg_lte_dec
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec", "lte_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lt_dec {T} {L:Lte T} {R:RelDec lte}
:= rel_dec.
Definition
lt_dec
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lt_dec {T} {L:Lte T} {R:RelDec lte} x y
:= negb (lt_dec x y).
Definition
neg_lt_dec
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "Lte", "RelDec", "lt_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lte_dec_p (x:T) (y:T) : {lte x y} + {~lte x y}
:= rel_dec_p x y.
Definition
lte_dec_p
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lte_dec_p (x:T) (y:T) : {~lte x y} + {lte x y}
:= neg_rel_dec_p x y.
Definition
neg_lte_dec_p
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "neg_rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
lt_dec_p (x:T) (y:T) : {lt x y} + {~lt x y}
:= rel_dec_p x y.
Definition
lt_dec_p
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt", "rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
neg_lt_dec_p (x:T) (y:T) : {~lt x y} + {lt x y}
:= neg_rel_dec_p x y.
Definition
neg_lt_dec_p
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt", "neg_rel_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=! y"
:= (lte_dec x y) (at level 35, no associativity).
Notation
x <=! y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=! y <=! z"
:= (lte_dec x y /\ lte_dec y z) (at level 35, y at next level, no associativity).
Notation
x <=! y <=! z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=! y"
:= (lte_dec y x) (at level 35, no associativity, only parsing).
Notation
x >=! y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=! y >=! z"
:= (lte_dec z y /\ lte_dec y x) (at level 35, y at next level, no associativity).
Notation
x >=! y >=! z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <! y"
:= (lt_dec x y) (at level 35, no associativity).
Notation
x <! y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <! y <! z"
:= (lt_dec x y /\ lt_dec y z) (at level 35, y at next level, no associativity).
Notation
x <! y <! z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >! y"
:= (lt_dec y x) (at level 35, no associativity, only parsing).
Notation
x >! y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >! y >! z"
:= (lt_dec z y /\ lt_dec y x) (at level 35, y at next level, no associativity).
Notation
x >! y >! z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=? y"
:= (lte_dec_p y x) (at level 35, no associativity).
Notation
x <=? y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=? y <=? z"
:= (lte_dec_p x y /\ lte_dec_p y z) (at level 35, y at next level, no associativity).
Notation
x <=? y <=? z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=? y"
:= (lte_dec_p y x) (at level 35, no associativity, only parsing).
Notation
x >=? y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=? y >=? z"
:= (lte_dec_p z y /\ lte_dec_p y x) (at level 35, y at next level, no associativity, only parsing).
Notation
x >=? y >=? z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lte_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <? y"
:= (lt_dec_p y x) (at level 35, no associativity).
Notation
x <? y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <? y <? z"
:= (lt_dec_p x y /\ lt_dec_p y z) (at level 35, y at next level, no associativity).
Notation
x <? y <? z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >? y"
:= (lt_dec_p y x) (at level 35, no associativity, only parsing).
Notation
x >? y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >? y >? z"
:= (lt_dec_p z y /\ lt_dec_p y x) (at level 35, y at next level, no associativity, only parsing).
Notation
x >? y >? z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt_dec_p" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=. y"
:= (lte x y) (at level 70, no associativity).
Notation
x <=. y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <=. y <=. z"
:= (lte x y /\ lte y z) (at level 70, y at next level, no associativity).
Notation
x <=. y <=. z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=. y"
:= (lte y x) (at level 70, no associativity, only parsing).
Notation
x >=. y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >=. y >=. z"
:= (lte z y /\ lte y x) (at level 70, y at next level, no associativity, only parsing).
Notation
x >=. y >=. z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <. y"
:= (lt x y) (at level 70, no associativity).
Notation
x <. y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <. y <. z"
:= (lt x y /\ lt y z) (at level 70, y at next level, no associativity).
Notation
x <. y <. z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >. y"
:= (lt y x) (at level 70, no associativity, only parsing).
Notation
x >. y
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x >. y >. z"
:= (lt z y /\ lt y x) (at level 70, y at next level, no associativity, only parsing).
Notation
x >. y >. z
Programming
theories/Programming/Le.v
[ "Coq.Bool.Bool", "Equivalence", "ExtLib.Core.RelDec" ]
[ "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
showM@{T} : Type@{Ushow}
:= forall m : Type@{T}, Injection ascii m -> Monoid m -> m.
Definition
showM
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Injection", "Monoid" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
ShowScheme@{t} (T : Type@{t}) : Type
:= { show_mon : Monoid@{t} T ; show_inj : Injection ascii T }.
Class
ShowScheme
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Injection", "Monoid" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
ShowScheme_string : ShowScheme string
:= { show_mon := Monoid_string_append ; show_inj := fun x => String x EmptyString }.
Instance
ShowScheme_string
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Monoid_string_append", "ShowScheme" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
ShowScheme_string_compose : ShowScheme (string -> string)
:= { show_mon := Monoid_compose string ; show_inj := String }.
Instance
ShowScheme_string_compose
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Monoid_compose", "ShowScheme" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
runShow {T} {M : ShowScheme T} (m : showM) : T
:= m _ show_inj show_mon.
Definition
runShow
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "ShowScheme", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Show@{t m} (T : Type@{t}) : Type
:= show : T -> showM@{m}.
Class
Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
to_string {T} {M : Show T} (v : T) : string
:= runShow (show v) ""%string.
Definition
to_string
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show", "runShow" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
empty : showM
:= fun _ _ m => monoid_unit m.
Definition
empty
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
cat (a b : showM) : showM
:= fun _ i m => monoid_plus m (a _ i m) (b _ i m).
Definition
cat
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Injection_ascii_showM : Injection ascii showM
:= fun v => fun _ i _ => i v.
Instance
Injection_ascii_showM
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Injection", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
show_exact (s : string) : showM
:= match s with | EmptyString => empty | String a s' => cat (inject a) (show_exact s') end.
Fixpoint
show_exact
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "cat", "empty", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x << y"
:= (cat x%show y%show) (at level 100) : show_scope.
Notation
x << y
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "cat" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
show_exact : string >-> showM.
Coercion
show_exact
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
_inject_char : ascii -> showM
:= inject.
Definition
_inject_char
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
_inject_char : ascii >-> showM.
Coercion
_inject_char
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
indent (indent : showM) (v : showM) : showM
:= let nl := Ascii.ascii_of_nat 10 in fun _ inj mon => v _ (fun a => if eq_dec a nl then monoid_plus mon (inj a) (indent _ inj mon) else inj a) mon.
Definition
indent
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "eq_dec", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
sepBy {T : Type} {F : Foldable T showM} (sep : showM) (ls : T) : showM
:= match fold (fun s acc => match acc with | None => Some s | Some x => Some (x << sep << s) end) None ls with | None => empty | Some s => s end.
Definition
sepBy
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Foldable", "empty", "fold", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
sepBy_f (sep : showM) (ls : T) : showM
:= match fold (fun s acc => match acc with | None => Some (f s) | Some x => Some (x << sep << f s) end) None ls with | None => empty | Some s => s end.
Definition
sepBy_f
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "empty", "fold", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
wrap (before after : showM) (x : showM) : showM
:= cat before (cat x after).
Definition
wrap
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "cat", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
sum_Show@{a m} {A : Type@{a}} {B : Type@{a}} {AS:Show@{a m} A} {BS:Show@{a m} B} : Show@{a m} (A+B)
:= fun s => let (tag, payload) := match s with | inl a => (show_exact "inl"%string, show a) | inr b => (show_exact "inr"%string, show b) end in "("%char << tag << " "%char << payload << ")"%char.
Definition
sum_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show", "show_exact" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
foldable_Show : Show B
:= { show s := sepBy_f show (show_exact ", "%string) s }.
Instance
foldable_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show", "sepBy_f", "show_exact" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
iter_show (ss : list showM) : showM
:= match ss with | nil => empty | cons s ss => cat s (iter_show ss) end.
Fixpoint
iter_show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "cat", "empty", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
unit_Show : Show unit
:= { show u := "tt"%string }.
Instance
unit_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
bool_Show : Show bool
:= { show b := if b then "true"%string else "false"%string }.
Instance
bool_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
ascii_Show : Show ascii
:= fun a => "'"%char << a << "'"%char.
Instance
ascii_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
string_Show : Show string
:= { show s := """"%char << s << """"%char }.
Instance
string_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
nat_show (n:nat) {measure n} : showM := if Compare_dec.le_gt_dec n 9 then inject (Char.digit2ascii n) else let n' := Nat.div n 10 in (@nat_show n' _) << (inject (Char.digit2ascii (n - 10 * n'))).
Next Obligation. assert (Nat.div n 10 < n) ; eauto. eapply Nat.div_lt. match goal with [ H : n > _ |- _ ] => inversion H end; apply Nat.lt_0_succ. repeat constructor. Defined.
Fixpoint
nat_show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "apply", "assert", "digit2ascii", "showM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075