statement
stringlengths
1
4.33k
proof
stringlengths
0
37.9k
type
stringclasses
25 values
symbolic_name
stringlengths
1
67
library
stringclasses
10 values
filename
stringclasses
112 values
imports
listlengths
2
138
deps
listlengths
0
64
docstring
stringclasses
798 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
card_void : #|{: void}| = 0.
Proof. by rewrite cardT enumT unlock. Qed.
Lemma
card_void
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cardT", "enumT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
enumF T
:= (Finite.enum T).
Notation
enumF
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
option_enum
:= None :: map some (enumF T).
Definition
option_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enumF", "map" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
option_enumP : Finite.axiom option_enum.
Proof. by case=> [x|]; rewrite /= count_map (count_pred0, enumP). Qed.
Lemma
option_enumP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "axiom", "count_map", "count_pred0", "enumP", "option_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_option : #|{: option T}| = #|T|.+1.
Proof. by rewrite !cardT !enumT [in LHS]unlock /= !size_map. Qed.
Lemma
card_option
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cardT", "enumT", "size_map" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pcan_enumP g : pcancel f g -> Finite.axiom (undup (pmap g (enumF fT))).
Proof. move=> fK x; rewrite count_uniq_mem ?undup_uniq // mem_undup. by rewrite mem_pmap -fK map_f // -enumT mem_enum. Qed.
Lemma
pcan_enumP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "axiom", "count_uniq_mem", "enumF", "enumT", "fK", "fT", "map_f", "mem_enum", "mem_pmap", "mem_undup", "pmap", "undup", "undup_uniq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
PCanIsFinite g fK
:= @isFinite.Build _ _ (@pcan_enumP g fK).
Definition
PCanIsFinite
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "Build", "fK", "pcan_enumP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
CanIsFinite g (fK : cancel f g)
:= PCanIsFinite (can_pcan fK).
Definition
CanIsFinite
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "PCanIsFinite", "fK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
codom_val sT x : (x \in codom (val : sT -> T)) = P x.
Proof. by apply/codomP/idP=> [[u ->]|Px]; last exists (Sub x Px); rewrite ?valP ?SubK. Qed.
Lemma
codom_val
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "Px", "Sub", "SubK", "apply", "codom", "codomP", "last", "sT", "val", "valP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sub_enum : seq sT
:= pmap insub (enumF T).
Definition
sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enumF", "insub", "pmap", "sT", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_sub_enum u : u \in sub_enum.
Proof. by rewrite mem_pmap_sub -enumT mem_enum. Qed.
Lemma
mem_sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enumT", "mem_enum", "mem_pmap_sub", "sub_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sub_enum_uniq : uniq sub_enum.
Proof. by rewrite pmap_sub_uniq // -enumT enum_uniq. Qed.
Lemma
sub_enum_uniq
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enumT", "enum_uniq", "pmap_sub_uniq", "sub_enum", "uniq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
val_sub_enum : map val sub_enum = enum P.
Proof. rewrite pmap_filter; first exact: insubK. by apply: eq_filter => x; apply: isSome_insub. Qed.
Lemma
val_sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "enum", "eq_filter", "insubK", "isSome_insub", "map", "pmap_filter", "sub_enum", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'Finite' 'of' T 'by' <: ]"
:= (Finite.copy T%type (sub_type T%type)) (format "[ 'Finite' 'of' T 'by' <: ]") : form_scope.
Notation
[ 'Finite' 'of' T 'by' <: ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "copy", "sub_type", "type" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_sub : #|sfT| = #|[pred x | P x]|.
Proof. by rewrite -(eq_card (codom_val sfT)) (card_image val_inj). Qed.
Lemma
card_sub
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "card_image", "codom_val", "eq_card", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_card_sub (A : {pred sfT}) : A =i predT -> #|A| = #|[pred x | P x]|.
Proof. exact: eq_card_trans card_sub. Qed.
Lemma
eq_card_sub
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "card_sub", "eq_card_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_sig : #|{: {x | P x}}| = #|[pred x | P x]|.
Proof. exact: card_sub. Qed.
Lemma
card_sig
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "card_sub" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub : Type
:= SeqSub {ssval : T; ssvalP : in_mem ssval (@mem T _ s)}.
Record
seq_sub
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_enum : seq seq_sub
:= undup (pmap insub s).
Definition
seq_sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "insub", "pmap", "seq", "seq_sub", "undup" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_seq_sub_enum x : x \in seq_sub_enum.
Proof. by rewrite mem_undup mem_pmap -valK map_f ?ssvalP. Qed.
Lemma
mem_seq_sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "map_f", "mem_pmap", "mem_undup", "seq_sub_enum", "valK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
val_seq_sub_enum : uniq s -> map val seq_sub_enum = s.
Proof. move=> Us; rewrite /seq_sub_enum undup_id ?pmap_sub_uniq //. rewrite (pmap_filter (insubK _)); apply/all_filterP. by apply/allP => x; rewrite isSome_insub. Qed.
Lemma
val_seq_sub_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "allP", "all_filterP", "apply", "insubK", "isSome_insub", "map", "pmap_filter", "pmap_sub_uniq", "seq_sub_enum", "undup_id", "uniq", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_pickle x
:= index x seq_sub_enum.
Definition
seq_sub_pickle
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "index", "seq_sub_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_unpickle n
:= nth None (map some seq_sub_enum) n.
Definition
seq_sub_unpickle
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "map", "nth", "seq_sub_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_pickleK : pcancel seq_sub_pickle seq_sub_unpickle.
Proof. rewrite /seq_sub_unpickle => x. by rewrite (nth_map x) ?nth_index ?index_mem ?mem_seq_sub_enum. Qed.
Lemma
seq_sub_pickleK
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "index_mem", "mem_seq_sub_enum", "nth_index", "nth_map", "seq_sub_pickle", "seq_sub_unpickle" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_isCountable
:= isCountable.Build seq_sub seq_sub_pickleK.
Definition
seq_sub_isCountable
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "Build", "isCountable", "seq_sub", "seq_sub_pickleK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_axiom : Finite.axiom seq_sub_enum.
Proof. exact: Finite.uniq_enumP (undup_uniq _) mem_seq_sub_enum. Qed.
Fact
seq_sub_axiom
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "axiom", "mem_seq_sub_enum", "seq_sub_enum", "undup_uniq", "uniq_enumP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_isFinite
:= isFinite.Build seq_sub seq_sub_axiom.
Definition
seq_sub_isFinite
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "Build", "seq_sub", "seq_sub_axiom" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
adhoc_seq_sub_choiceType : choiceType
:= pcan_type seq_sub_pickleK.
Definition
adhoc_seq_sub_choiceType
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "pcan_type", "seq_sub_pickleK" ]
with the generic sub_choiceType canonical instance.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
adhoc_seq_sub_countType
:= HB.pack_for countType seq_sub seq_sub_isCountable (Choice.class adhoc_seq_sub_choiceType).
Definition
adhoc_seq_sub_countType
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "adhoc_seq_sub_choiceType", "class", "seq_sub", "seq_sub_isCountable" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
adhoc_seq_sub_finType
:= HB.pack_for finType seq_sub seq_sub_isFinite seq_sub_isCountable (Choice.class adhoc_seq_sub_choiceType).
Definition
adhoc_seq_sub_finType
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "adhoc_seq_sub_choiceType", "class", "seq_sub", "seq_sub_isCountable", "seq_sub_isFinite" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_sub_default s : size s > 0 -> seq_sub s.
Proof. by case: s => // x s _; exists x; rewrite mem_head. Qed.
Lemma
seq_sub_default
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "mem_head", "seq_sub", "size" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
seq_subE s (s_gt0 : size s > 0) : s = map val (map (insubd (seq_sub_default s_gt0)) s : seq (seq_sub s)).
Proof. by rewrite -map_comp map_id_in// => x x_in_s /=; rewrite insubdK. Qed.
Lemma
seq_subE
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "insubd", "insubdK", "map", "map_comp", "map_id_in", "seq", "seq_sub", "seq_sub_default", "size", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_sub_seq s_gt0
:= (insubd (seq_sub_default s_gt0)).
Notation
in_sub_seq
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "insubd", "seq_sub_default" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sT
:= (seq_sub s).
Notation
sT
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "seq_sub" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_seq_sub : uniq s -> #|{:sT}| = size s.
Proof. by move=> Us; rewrite cardE enumT -(size_map val) unlock val_seq_sub_enum. Qed.
Lemma
card_seq_sub
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cardE", "enumT", "sT", "size", "size_map", "uniq", "val", "val_seq_sub_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
extremum_spec {T : eqType} (ord : rel T) {I : finType} (P : pred I) (F : I -> T) : I -> Type
:= ExtremumSpec (i : I) of P i & (forall j : I, P j -> ord (F i) (F j)) : extremum_spec ord P F i.
Variant
extremum_spec
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "rel" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
arg_pred {T : eqType} ord {I : finType} (P : pred I) (F : I -> T)
:= [pred i | P i & [forall (j | P j), ord (F i) (F j)]].
Let
arg_pred
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
extremum
:= odflt i0 (pick (arg_pred ord P F)).
Definition
extremum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "arg_pred", "i0", "pick" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_refl : reflexive ord.
Hypothesis
ord_refl
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_trans : transitive ord.
Hypothesis
ord_trans
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_total : total ord.
Hypothesis
ord_total
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "total" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Pi0 : P i0.
Hypothesis
Pi0
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
extremumP : extremum_spec ord P F extremum.
Proof. rewrite /extremum; case: pickP => [i /andP[Pi /'forall_implyP/= min_i] | no_i]. by split=> // j; apply/implyP. have := sort_sorted ord_total [seq F i | i <- enum P]. set s := sort _ _ => ss; have s_gt0 : size s > 0 by rewrite size_sort size_map -cardE; apply/card_gt0P; exists i0. pose t0 := nth (F i0) s 0; ...
Lemma
extremumP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "cardE", "card_gt0P", "enum", "extremum", "extremum_spec", "i0", "mapP", "map_f", "mem_enum", "mem_nth", "mem_sort", "nth", "nthP", "ord_total", "pickP", "seq", "sig2_eqW", "size", "size_map", "size_sort", "sort", "sort_sorted", "sorted_leq_nth", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_refl : {in P, reflexive (relpre F ord)}.
Hypothesis
ord_refl
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_trans : {in P & P & P, transitive (relpre F ord)}.
Hypothesis
ord_trans
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_total : {in P &, total (relpre F ord)}.
Hypothesis
ord_total
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "total" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
extremum_inP : extremum_spec ord P F (extremum ord i0 P F).
Proof. rewrite /extremum; case: pickP => [i /andP[Pi /'forall_implyP/= min_i] | no_i]. by split=> // j; apply/implyP. pose TP := seq_sub [seq F i | i <- enum P]. have FPP (iP : {i | P i}) : F (proj1_sig iP) \in [seq F i | i <- enum P]. by rewrite map_f// mem_enum; apply: valP. pose FP := SeqSub (FPP _). have []//= ...
Lemma
extremum_inP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "Pi0", "apply", "enum", "existsP", "extremum", "extremumP", "extremum_spec", "i0", "mapP", "map_f", "mem_enum", "negb_forall", "ord_refl", "ord_total", "ord_trans", "pickP", "seq", "seq_sub", "sigW", "split", "val", "valP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg[' ord ]_( i < i0 | P ) F ]"
:= (extremum ord i0 (fun i => P%B) (fun i => F)) (ord, i, i0 at level 10, format "[ 'arg[' ord ]_( i < i0 | P ) F ]") : nat_scope.
Notation
[ 'arg[' ord ]_( i < i0 | P ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "extremum", "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg[' ord ]_( i < i0 'in' A ) F ]"
:= [arg[ord]_(i < i0 | i \in A) F] (format "[ 'arg[' ord ]_( i < i0 'in' A ) F ]") : nat_scope.
Notation
[ 'arg[' ord ]_( i < i0 'in' A ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg[' ord ]_( i < i0 ) F ]"
:= [arg[ord]_(i < i0 | true) F] (format "[ 'arg[' ord ]_( i < i0 ) F ]") : nat_scope.
Notation
[ 'arg[' ord ]_( i < i0 ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
arg_min
:= extremum leq i0 P F.
Definition
arg_min
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "extremum", "i0", "leq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
arg_max
:= extremum geq i0 P F.
Definition
arg_max
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "extremum", "geq", "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
arg_minnP : extremum_spec leq P F arg_min.
Proof. by apply: extremumP => //; [apply: leq_trans|apply: leq_total]. Qed.
Lemma
arg_minnP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "arg_min", "extremumP", "extremum_spec", "leq", "leq_total", "leq_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
arg_maxnP : extremum_spec geq P F arg_max.
Proof. apply: extremumP => //; first exact: leqnn. by move=> n m p mn np; apply: leq_trans mn. by move=> ??; apply: leq_total. Qed.
Lemma
arg_maxnP
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "arg_max", "extremumP", "extremum_spec", "geq", "leq_total", "leq_trans", "leqnn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'min_' ( i < i0 | P ) F ]"
:= (arg_min i0 (fun i => P%B) (fun i => F)) (i, i0 at level 10, format "[ 'arg' 'min_' ( i < i0 | P ) F ]") : nat_scope.
Notation
[ 'arg' 'min_' ( i < i0 | P ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "arg_min", "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'min_' ( i < i0 'in' A ) F ]"
:= [arg min_(i < i0 | i \in A) F] (format "[ 'arg' 'min_' ( i < i0 'in' A ) F ]") : nat_scope.
Notation
[ 'arg' 'min_' ( i < i0 'in' A ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'min_' ( i < i0 ) F ]"
:= [arg min_(i < i0 | true) F] (format "[ 'arg' 'min_' ( i < i0 ) F ]") : nat_scope.
Notation
[ 'arg' 'min_' ( i < i0 ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'max_' ( i > i0 | P ) F ]"
:= (arg_max i0 (fun i => P%B) (fun i => F)) (i, i0 at level 10, format "[ 'arg' 'max_' ( i > i0 | P ) F ]") : nat_scope.
Notation
[ 'arg' 'max_' ( i > i0 | P ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "arg_max", "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'max_' ( i > i0 'in' A ) F ]"
:= [arg max_(i > i0 | i \in A) F] (format "[ 'arg' 'max_' ( i > i0 'in' A ) F ]") : nat_scope.
Notation
[ 'arg' 'max_' ( i > i0 'in' A ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'arg' 'max_' ( i > i0 ) F ]"
:= [arg max_(i > i0 | true) F] (format "[ 'arg' 'max_' ( i > i0 ) F ]") : nat_scope.
Notation
[ 'arg' 'max_' ( i > i0 ) F ]
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "i0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordinal : predArgType
:= Ordinal m of m < n.
Inductive
ordinal
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nat_of_ord i
:= let: Ordinal m _ := i in m.
Coercion
nat_of_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ltn_ord (i : ordinal) : i < n.
Proof. exact: valP i. Qed.
Lemma
ltn_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordinal", "valP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_inj : injective nat_of_ord.
Proof. exact: val_inj. Qed.
Lemma
ord_inj
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "nat_of_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_enum : seq ordinal
:= pmap insub (iota 0 n).
Definition
ord_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "insub", "iota", "ordinal", "pmap", "seq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
val_ord_enum : map val ord_enum = iota 0 n.
Proof. rewrite pmap_filter; first exact: insubK. by apply/all_filterP; apply/allP=> i; rewrite mem_iota isSome_insub. Qed.
Lemma
val_ord_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "allP", "all_filterP", "apply", "insubK", "iota", "isSome_insub", "map", "mem_iota", "ord_enum", "pmap_filter", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_enum_uniq : uniq ord_enum.
Proof. by rewrite pmap_sub_uniq ?iota_uniq. Qed.
Lemma
ord_enum_uniq
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "iota_uniq", "ord_enum", "pmap_sub_uniq", "uniq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_ord_enum i : i \in ord_enum.
Proof. by rewrite -(mem_map ord_inj) val_ord_enum mem_iota ltn_ord. Qed.
Lemma
mem_ord_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ltn_ord", "mem_iota", "mem_map", "ord_enum", "ord_inj", "val_ord_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"''I_' n"
:= (ordinal n) (at level 0, n at level 2, format "''I_' n").
Notation
''I_' n
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordinal" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
val_enum_ord : map val (enum 'I_n) = iota 0 n.
Proof. by rewrite enumT unlock val_ord_enum. Qed.
Lemma
val_enum_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enum", "enumT", "iota", "map", "val", "val_ord_enum" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
size_enum_ord : size (enum 'I_n) = n.
Proof. by rewrite -(size_map val) val_enum_ord size_iota. Qed.
Lemma
size_enum_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enum", "size", "size_iota", "size_map", "val", "val_enum_ord" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_ord : #|'I_n| = n.
Proof. by rewrite cardE size_enum_ord. Qed.
Lemma
card_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cardE", "size_enum_ord" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nth_enum_ord i0 m : m < n -> nth i0 (enum 'I_n) m = m :> nat.
Proof. by move=> ?; rewrite -(nth_map _ 0) (size_enum_ord, val_enum_ord) // nth_iota. Qed.
Lemma
nth_enum_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enum", "i0", "nat", "nth", "nth_iota", "nth_map", "size_enum_ord", "val_enum_ord" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
nth_ord_enum (i0 i : 'I_n) : nth i0 (enum 'I_n) i = i.
Proof. by apply: val_inj; apply: nth_enum_ord. Qed.
Lemma
nth_ord_enum
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "enum", "i0", "nth", "nth_enum_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
index_enum_ord (i : 'I_n) : index i (enum 'I_n) = i.
Proof. by rewrite -[in LHS](nth_ord_enum i i) index_uniq ?(enum_uniq, size_enum_ord). Qed.
Lemma
index_enum_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "enum", "enum_uniq", "index", "index_uniq", "nth_ord_enum", "size_enum_ord" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mask_enum_ord m : mask m (enum 'I_n) = [seq i <- enum 'I_n | nth false m (val i)].
Proof. rewrite mask_filter ?enum_uniq//; apply: eq_filter => i. by rewrite in_mask ?enum_uniq ?mem_enum// index_enum_ord. Qed.
Lemma
mask_enum_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "enum", "enum_uniq", "eq_filter", "in_mask", "index_enum_ord", "mask", "mask_filter", "mem_enum", "nth", "seq", "val" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
enum_ord0 : enum 'I_0 = [::].
Proof. by apply/eqP; rewrite -size_eq0 size_enum_ord. Qed.
Lemma
enum_ord0
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "enum", "size_enum_ord", "size_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
widen_ord_proof n m (i : 'I_n) : n <= m -> i < m.
Proof. exact: leq_trans. Qed.
Lemma
widen_ord_proof
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "leq_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
widen_ord n m le_n_m i
:= Ordinal (@widen_ord_proof n m i le_n_m).
Definition
widen_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "widen_ord_proof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ord_proof n m (i : 'I_n) : n = m -> i < m.
Proof. by move <-. Qed.
Lemma
cast_ord_proof
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ord n m eq_n_m i
:= Ordinal (@cast_ord_proof n m i eq_n_m).
Definition
cast_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cast_ord_proof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ord_id n eq_n i : cast_ord eq_n i = i :> 'I_n.
Proof. exact: val_inj. Qed.
Lemma
cast_ord_id
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cast_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ord_comp n1 n2 n3 eq_n2 eq_n3 i : @cast_ord n2 n3 eq_n3 (@cast_ord n1 n2 eq_n2 i) = cast_ord (etrans eq_n2 eq_n3) i.
Proof. exact: val_inj. Qed.
Lemma
cast_ord_comp
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cast_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ordK n1 n2 eq_n : cancel (@cast_ord n1 n2 eq_n) (cast_ord (esym eq_n)).
Proof. by move=> i; apply: val_inj. Qed.
Lemma
cast_ordK
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "cast_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ordKV n1 n2 eq_n : cancel (cast_ord (esym eq_n)) (@cast_ord n1 n2 eq_n).
Proof. by move=> i; apply: val_inj. Qed.
Lemma
cast_ordKV
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "cast_ord", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cast_ord_inj n1 n2 eq_n : injective (@cast_ord n1 n2 eq_n).
Proof. exact: can_inj (cast_ordK eq_n). Qed.
Lemma
cast_ord_inj
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "cast_ord", "cast_ordK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordS_subproof n (i : 'I_n) : i.+1 %% n < n.
Proof. by case: n i => [|n] [m m_lt]//=; rewrite ltn_pmod. Qed.
Fact
ordS_subproof
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ltn_pmod" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordS n (i : 'I_n)
:= Ordinal (ordS_subproof i).
Definition
ordS
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordS_subproof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_pred_subproof n (i : 'I_n) : (i + n).-1 %% n < n.
Proof. by case: n i => [|n] [m m_lt]//=; rewrite ltn_pmod. Qed.
Fact
ord_pred_subproof
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ltn_pmod" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_pred n (i : 'I_n)
:= Ordinal (ord_pred_subproof i).
Definition
ord_pred
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ord_pred_subproof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordSK n : cancel (@ordS n) (@ord_pred n).
Proof. move=> [i ilt]; apply/val_inj => /=. case: (ltngtP i.+1) (ilt) => // [Silt|<-]; last by rewrite modnn/= modn_small. by rewrite [i.+1 %% n]modn_small// addSn/= modnDr modn_small. Qed.
Lemma
ordSK
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "addSn", "apply", "last", "ltngtP", "modnDr", "modn_small", "modnn", "ordS", "ord_pred", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_predK n : cancel (@ord_pred n) (@ordS n).
Proof. move=> [[|i] ilt]; apply/val_inj => /=. by rewrite [n.-1 %% n]modn_small// prednK// modnn. by rewrite modnDr [i %% n]modn_small ?modn_small// ltnW. Qed.
Lemma
ord_predK
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "ltnW", "modnDr", "modn_small", "modnn", "ordS", "ord_pred", "prednK", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordS_bij n : bijective (@ordS n).
Proof. exact: (Bijective (@ordSK n) (@ord_predK n)). Qed.
Lemma
ordS_bij
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordS", "ordSK", "ord_predK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ordS_inj n : injective (@ordS n).
Proof. exact: (bij_inj (ordS_bij n)). Qed.
Lemma
ordS_inj
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordS", "ordS_bij" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_pred_bij n : bijective (@ord_pred n).
Proof. exact (Bijective (@ord_predK n) (@ordSK n)). Qed.
Lemma
ord_pred_bij
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ordSK", "ord_pred", "ord_predK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ord_pred_inj n : injective (@ord_pred n).
Proof. exact: (bij_inj (ord_pred_bij n)). Qed.
Lemma
ord_pred_inj
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "ord_pred", "ord_pred_bij" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_ord_proof n (i : 'I_n) : n - i.+1 < n.
Proof. by case: n i => [|n] [i lt_i_n] //; rewrite ltnS subSS leq_subr. Qed.
Lemma
rev_ord_proof
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "leq_subr", "ltnS", "subSS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_ord n i
:= Ordinal (@rev_ord_proof n i).
Definition
rev_ord
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "rev_ord_proof" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_ordK {n} : involutive (@rev_ord n).
Proof. by case: n => [|n] [i lti] //; apply: val_inj; rewrite /= !subSS subKn. Qed.
Lemma
rev_ordK
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "apply", "rev_ord", "subKn", "subSS", "val_inj" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rev_ord_inj {n} : injective (@rev_ord n).
Proof. exact: inv_inj rev_ordK. Qed.
Lemma
rev_ord_inj
boot
boot/fintype.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrfun", "ssrbool", "ssrnotations", "eqtype", "ssrnat", "seq", "choice", "path", "div", "FiniteQuant.Exports", "Finite" ]
[ "rev_ord", "rev_ordK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d