fact
stringlengths 2
32.6k
| type
stringclasses 10
values | library
stringclasses 5
values | imports
stringclasses 205
values | filename
stringclasses 216
values | symbolic_name
stringlengths 1
67
| index_level
int64 0
10.5k
|
---|---|---|---|---|---|---|
`{cf : checker_flags} [gph uctx uctx' gctx'] : gc_of_uctx uctx' = Some gctx' -> is_graph_of_uctx gph uctx -> is_graph_of_uctx (add_uctx gctx' gph) (ContextSet.union uctx' uctx). Proof. move=> h' /on_SomeP [gctx [h eq]]. red. move: (gc_of_uctx_union _ _ _ _ h' h) => [gc'' [-> /= ?]]. have eq' : (gcs_equal (LS.union gctx'.1 gctx.1, gc'') (gctx_union gctx' gctx)) by split=> //=. rewrite <- eq, eq'; symmetry; apply: add_uctx_make_graph2. Qed. | Lemma | common | Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms. From MetaCoq.Utils Require Import utils wGraph. From MetaCoq.Common Require Import config Universes. From Equations.Prop Require Import DepElim. From Equations Require Import Equations. Import ConstraintType. Import MCMonadNotation. Import VariableLevel GoodConstraint. Module Import wGraph := WeightedGraph Level LevelSet. Import NonEmptySetFacts. Import Nbar Datatypes. Require Import SetoidTactics. From MetaCoq.Utils Require Import MCUtils. | common\theories\uGraph.v | is_graph_of_uctx_add | 1,000 |
`{cf : checker_flags} [gph gctx] : is_graph_of_uctx gph gctx -> is_consistent gctx <-> wGraph.is_acyclic gph. Proof. unfold is_consistent. by move=> /on_SomeP [? [-> <-]]. Qed. | Lemma | common | Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms. From MetaCoq.Utils Require Import utils wGraph. From MetaCoq.Common Require Import config Universes. From Equations.Prop Require Import DepElim. From Equations Require Import Equations. Import ConstraintType. Import MCMonadNotation. Import VariableLevel GoodConstraint. Module Import wGraph := WeightedGraph Level LevelSet. Import NonEmptySetFacts. Import Nbar Datatypes. Require Import SetoidTactics. From MetaCoq.Utils Require Import MCUtils. | common\theories\uGraph.v | is_consistent_spec2 | 1,001 |
lvls1 lvls2 cs : global_uctx_invariants (lvls1, cs) \/ global_uctx_invariants (lvls2, cs) -> global_uctx_invariants (LevelSet.union lvls1 lvls2, cs). Proof. cbv [global_uctx_invariants uctx_invariants ConstraintSet.For_all declared_cstr_levels]; cbn [fst snd ContextSet.levels ContextSet.constraints]. repeat first [ apply conj | progress intros | progress cbv beta iota in * | progress destruct ? | progress destruct_head'_and | progress destruct_head'_or | progress split_and | rewrite !LevelSet.union_spec | progress specialize_dep_under_binders_by eapply pair | solve [ eauto ] ]. Qed. | Lemma | common | Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms. From MetaCoq.Utils Require Import utils wGraph. From MetaCoq.Common Require Import config Universes. From Equations.Prop Require Import DepElim. From Equations Require Import Equations. Import ConstraintType. Import MCMonadNotation. Import VariableLevel GoodConstraint. Module Import wGraph := WeightedGraph Level LevelSet. Import NonEmptySetFacts. Import Nbar Datatypes. Require Import SetoidTactics. From MetaCoq.Utils Require Import MCUtils. | common\theories\uGraph.v | global_uctx_invariants_union_or | 1,002 |
lvls1 lvls2 cs : global_gc_uctx_invariants (lvls1, cs) \/ global_gc_uctx_invariants (lvls2, cs) -> global_gc_uctx_invariants (VSet.union lvls1 lvls2, cs). Proof. cbv [global_gc_uctx_invariants uctx_invariants GoodConstraintSet.For_all declared_cstr_levels]; cbn [fst snd ContextSet.levels ContextSet.constraints]. repeat first [ apply conj | progress intros | progress cbv beta iota in * | progress subst | progress destruct ? | progress destruct_head'_and | progress destruct_head'_or | progress split_and | rewrite !VSet.union_spec | progress specialize_dep_under_binders_by eassumption | solve [ eauto ] ]. Qed. | Lemma | common | Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms. From MetaCoq.Utils Require Import utils wGraph. From MetaCoq.Common Require Import config Universes. From Equations.Prop Require Import DepElim. From Equations Require Import Equations. Import ConstraintType. Import MCMonadNotation. Import VariableLevel GoodConstraint. Module Import wGraph := WeightedGraph Level LevelSet. Import NonEmptySetFacts. Import Nbar Datatypes. Require Import SetoidTactics. From MetaCoq.Utils Require Import MCUtils. | common\theories\uGraph.v | global_gc_uctx_invariants_union_or | 1,003 |
lvls1 lvls2 cstr u : gc_levels_declared (lvls1, cstr) u \/ gc_levels_declared (lvls2, cstr) u -> gc_levels_declared (VSet.union lvls1 lvls2, cstr) u. Proof. cbv [gc_levels_declared LevelExprSet.For_all gc_expr_declared on_Some_or_None LevelExpr.get_noprop]; cbn [fst]. repeat first [ apply conj | progress intros | progress cbv beta iota in * | progress destruct ? | progress destruct_head'_and | progress destruct_head'_or | progress split_and | rewrite !VSet.union_spec | progress specialize_dep_under_binders_by eassumption | solve [ eauto ] ]. Qed. | Lemma | common | Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms. From MetaCoq.Utils Require Import utils wGraph. From MetaCoq.Common Require Import config Universes. From Equations.Prop Require Import DepElim. From Equations Require Import Equations. Import ConstraintType. Import MCMonadNotation. Import VariableLevel GoodConstraint. Module Import wGraph := WeightedGraph Level LevelSet. Import NonEmptySetFacts. Import Nbar Datatypes. Require Import SetoidTactics. From MetaCoq.Utils Require Import MCUtils. | common\theories\uGraph.v | gc_levels_declared_union_or | 1,004 |
{ valuation_mono : string -> positive ; valuation_poly : nat -> nat }. | Record | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | valuation | 1,005 |
Set := | lzero | level (_ : string) | lvar (_ : nat) . | Inductive | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | t_ | 1,006 |
t_. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | t | 1,007 |
(x : t) := match x with | lzero => true | _ => false end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | is_set | 1,008 |
(l : t) := match l with | lvar _ => true | _ => false end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | is_var | 1,009 |
(l1 l2 : t) : comparison := match l1, l2 with | lzero, lzero => Eq | lzero, _ => Lt | _, lzero => Gt | level s1, level s2 => string_compare s1 s2 | level _, _ => Lt | _, level _ => Gt | lvar n, lvar m => Nat.compare n m end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | compare | 1,010 |
t -> t -> Prop := eq. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq | 1,011 |
Equivalence eq := _. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_equiv | 1,012 |
t -> t -> Prop := | ltSetLevel s : lt_ lzero (level s) | ltSetlvar n : lt_ lzero (lvar n) | ltLevelLevel s s' : StringOT.lt s s' -> lt_ (level s) (level s') | ltLevellvar s n : lt_ (level s) (lvar n) | ltlvarlvar n n' : Nat.lt n n' -> lt_ (lvar n) (lvar n'). | Inductive | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_ | 1,013 |
lt_. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt | 1,014 |
StrictOrder lt. Proof. constructor. - intros [| |] X; inversion X. now eapply irreflexivity in H1. eapply Nat.lt_irrefl; tea. - intros [| |] [| |] [| |] X1 X2; inversion X1; inversion X2; constructor. now transitivity s0. etransitivity; tea. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_strorder | 1,015 |
Proper (eq ==> eq ==> iff) lt. Proof. intros x y e z t e'. unfold eq in *; subst. reflexivity. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_compat | 1,016 |
forall x y : t, CompareSpec (x = y) (lt x y) (lt y x) (compare x y). Proof. intros [] []; repeat constructor. - eapply CompareSpec_Proper. 5: eapply CompareSpec_string. 4: reflexivity. all: split; [now inversion 1|]. now intros ->. all: intro; now constructor. - eapply CompareSpec_Proper. 5: eapply Nat.compare_spec. 4: reflexivity. all: split; [now inversion 1|]. now intros ->. all: intro; now constructor. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | compare_spec | 1,017 |
l1 l2 := match l1, l2 with | Level.lzero, Level.lzero => true | Level.level s1, Level.level s2 => ReflectEq.eqb s1 s2 | Level.lvar n1, Level.lvar n2 => ReflectEq.eqb n1 n2 | _, _ => false end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_level | 1,018 |
#[global, program] : ReflectEq Level.t := { eqb := eq_level }. Next Obligation. destruct x, y. all: unfold eq_level. all: try solve [ constructor ; reflexivity ]. all: try solve [ constructor ; discriminate ]. - destruct (ReflectEq.eqb_spec t0 t1) ; nodec. constructor. f_equal. assumption. - destruct (ReflectEq.eqb_spec n n0) ; nodec. constructor. subst. reflexivity. Defined. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | reflect_level | 1,019 |
eq_level. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eqb | 1,020 |
l l' : reflect (eq l l') (eqb l l'). Proof. apply reflectProp_reflect. now generalize (eqb_spec l l'). Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eqb_spec | 1,021 |
(x y : t) : eq x y -> x = y := id. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_leibniz | 1,022 |
forall (l1 l2 : t), {l1 = l2}+{l1 <> l2} := Classes.eq_dec. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_dec | 1,023 |
x y := LevelSet.add y (LevelSet.singleton x). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelSet_pair | 1,024 |
x y z : LevelSet.In x (LevelSet_pair y z) -> x = y \/ x = z. Proof. intro H. apply LevelSetFact.add_iff in H. destruct H; [intuition|]. apply LevelSetFact.singleton_1 in H; intuition. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelSet_pair_In | 1,025 |
(s s' : LevelSet.t) x : LevelSet.mem x (LevelSet.union s s') <-> LevelSet.mem x s \/ LevelSet.mem x s'. Proof. rewrite LevelSetFact.union_b. apply orb_true_iff. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelSet_mem_union | 1,026 |
x l : In x l <-> LevelSet.In x (fold_right LevelSet.add LevelSet.empty l). Proof. split. - induction l; simpl => //. intros [<-|H]. * eapply LevelSet.add_spec; left; auto. * eapply LevelSet.add_spec; right; auto. - induction l; simpl => //. * now rewrite LevelSetFact.empty_iff. * rewrite LevelSet.add_spec. intuition auto. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelSet_In_fold_right_add | 1,027 |
s : LevelSet.Equal (LevelSet.union LevelSet.empty s) s. Proof. intros x; rewrite LevelSet.union_spec. lsets. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelSet_union_empty | 1,028 |
lSProp | lProp. | Inductive | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | t | 1,029 |
(l1 l2 : t) : comparison := match l1, l2 with | lSProp, lSProp => Eq | lProp, lProp => Eq | lProp, lSProp => Gt | lSProp, lProp => Lt end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | compare | 1,030 |
t -> t -> Prop := ltSPropProp : lt_ lSProp lProp. | Inductive | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_ | 1,031 |
lt_. Global Instance lt_strorder : StrictOrder lt. split. - intros n X. destruct n;inversion X. - intros n1 n2 n3 X1 X2. destruct n1,n2,n3;auto; try inversion X1;try inversion X2. Defined. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt | 1,032 |
(Level.t * nat)%type. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | t | 1,033 |
(l : t) := (fst l, S (snd l)). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | succ | 1,034 |
(e : t) : Level.t := fst e. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | get_level | 1,035 |
(e : LevelExpr.t) := Some (fst e). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | get_noprop | 1,036 |
(e : t) : bool := match e with | (_, 0%nat) => true | _ => false end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | is_level | 1,037 |
(l : Level.t) : t := (l, 0%nat). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | make | 1,038 |
t := (Level.lzero, 0%nat). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | set | 1,039 |
t := (Level.lzero, 1%nat). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | type1 | 1,040 |
t -> t -> Prop := eq. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq | 1,041 |
Equivalence eq := _. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_equiv | 1,042 |
t -> t -> Prop := | ltLevelExpr1 l n n' : (n < n')%nat -> lt_ (l, n) (l, n') | ltLevelExpr2 l l' b b' : Level.lt l l' -> lt_ (l, b) (l', b'). | Inductive | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_ | 1,043 |
lt_. Global Instance lt_strorder : StrictOrder lt. Proof. constructor. - intros x X; inversion X. subst. lia. subst. eapply Level.lt_strorder; eassumption. - intros x y z X1 X2; invs X1; invs X2; constructor; tea. etransitivity; tea. etransitivity; tea. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt | 1,044 |
Proper (Logic.eq ==> Logic.eq ==> iff) lt. intros x x' H1 y y' H2; now rewrite H1 H2. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_compat | 1,045 |
(x y : t) : comparison := match x, y with | (l1, b1), (l2, b2) => match Level.compare l1 l2 with | Eq => Nat.compare b1 b2 | x => x end end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | compare | 1,046 |
forall x y : t, CompareSpec (x = y) (lt x y) (lt y x) (compare x y). Proof. intros [? ?] [? ?]; cbn; repeat constructor. destruct (Level.compare_spec t0 t1); repeat constructor; tas. subst. destruct (Nat.compare_spec n n0); repeat constructor; tas. congruence. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | compare_spec | 1,047 |
forall (l1 l2 : t), {l1 = l2} + {l1 <> l2} := Classes.eq_dec. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_dec | 1,048 |
(x y : t) : eq x y -> x = y := id. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_leibniz | 1,049 |
v l : val v (LevelExpr.make l) = val v l. Proof. destruct l eqn:H; cbnr. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_make | 1,050 |
v (l : Level.t) : val v (LevelExpr.make l) = val v l. Proof. destruct l; cbnr. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_make_npl | 1,051 |
#[global, program] : ReflectEq LevelExprSet.t := { eqb := LevelExprSet.equal }. Next Obligation. destruct (LevelExprSet.equal x y) eqn:e; constructor. eapply LevelExprSet.equal_spec in e. now eapply LevelExprSet.eq_leibniz. intros e'. subst y. pose proof (@LevelExprSetFact.equal_1 x x). forward H. reflexivity. congruence. Qed. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | levelexprset_reflect | 1,052 |
Classes.EqDec LevelExprSet.t := Classes.eq_dec. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | levelexprset_eq_dec | 1,053 |
{ t_set : LevelExprSet.t ; t_ne : LevelExprSet.is_empty t_set = false }. | Record | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | nonEmptyLevelExprSet | 1,054 |
(e : LevelExpr.t) : nonEmptyLevelExprSet := {| t_set := LevelExprSet.singleton e; t_ne := eq_refl |}. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | singleton | 1,055 |
s : ~ LevelExprSet.Empty s -> LevelExprSet.is_empty s = false. Proof. intro H. apply not_true_is_false. intro H'. apply H. now apply LevelExprSetFact.is_empty_2 in H'. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | not_Empty_is_empty | 1,056 |
e u e' : LevelExprSet.In e' (add e u) <-> e' = e \/ LevelExprSet.In e' u. Proof. apply LevelExprSet.add_spec. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | add_spec | 1,057 |
list LevelExpr.t -> nonEmptyLevelExprSet -> nonEmptyLevelExprSet := List.fold_left (fun u e => add e u). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | add_list | 1,058 |
l u e : LevelExprSet.In e (add_list l u) <-> In e l \/ LevelExprSet.In e u. Proof. unfold add_list. rewrite <- fold_left_rev_right. etransitivity. 2:{ eapply or_iff_compat_r. etransitivity. 2: apply @InA_In_eq with (A:=LevelExpr.t). eapply InA_rev. } induction (List.rev l); cbn. - split. intuition. intros [H|H]; tas. invs H. - split. + intro H. apply add_spec in H. destruct H as [H|H]. * left. now constructor. * apply IHl0 in H. destruct H as [H|H]; [left|now right]. now constructor 2. + intros [H|H]. inv H. * apply add_spec; now left. * apply add_spec; right. apply IHl0. now left. * apply add_spec; right. apply IHl0. now right. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | add_list_spec | 1,059 |
e : to_nonempty_list (singleton e) = (e, []). Proof. reflexivity. Defined. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | singleton_to_nonempty_list | 1,060 |
u : let '(e, u') := to_nonempty_list u in e :: u' = LevelExprSet.elements u. Proof. destruct u as [u1 u2]. unfold to_nonempty_list; cbn. set (l := LevelExprSet.elements u1). unfold l at 2 3 4. set (e := (eq_refl: l = LevelExprSet.elements u1)); clearbody e. destruct l. - exfalso. revert u2. apply eq_true_false_abs. unfold LevelExprSet.is_empty, LevelExprSet.Raw.is_empty, LevelExprSet.elements, LevelExprSet.Raw.elements in *. rewrite <- e; reflexivity. - reflexivity. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | to_nonempty_list_spec | 1,061 |
u : (to_nonempty_list u).1 :: (to_nonempty_list u).2 = LevelExprSet.elements u. Proof. pose proof (to_nonempty_list_spec u). now destruct (to_nonempty_list u). Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | to_nonempty_list_spec' | 1,062 |
(u : nonEmptyLevelExprSet) (e : LevelExpr.t) : LevelExprSet.In e u <-> e = (to_nonempty_list u).1 \/ In e (to_nonempty_list u).2. Proof. etransitivity. symmetry. apply LevelExprSet.elements_spec1. pose proof (to_nonempty_list_spec' u) as H. destruct (to_nonempty_list u) as [e' l]; cbn in *. rewrite <- H; clear. etransitivity. apply InA_cons. eapply or_iff_compat_l. apply InA_In_eq. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | In_to_nonempty_list | 1,063 |
(u : nonEmptyLevelExprSet) (e : LevelExpr.t) : LevelExprSet.In e u <-> e = (to_nonempty_list u).1 \/ In e (List.rev (to_nonempty_list u).2). Proof. etransitivity. eapply In_to_nonempty_list. apply or_iff_compat_l. apply in_rev. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | In_to_nonempty_list_rev | 1,064 |
(f : LevelExpr.t -> LevelExpr.t) (u : nonEmptyLevelExprSet) : nonEmptyLevelExprSet := let '(e, l) := to_nonempty_list u in add_list (List.map f l) (singleton (f e)). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | map | 1,065 |
f u e : LevelExprSet.In e (map f u) <-> exists e0, LevelExprSet.In e0 u /\ e = (f e0). Proof. unfold map. symmetry. etransitivity. { eapply iff_ex; intro. eapply and_iff_compat_r. eapply In_to_nonempty_list. } destruct (to_nonempty_list u) as [e' l]; cbn in *. symmetry. etransitivity. eapply add_list_spec. etransitivity. eapply or_iff_compat_l. apply LevelExprSet.singleton_spec. etransitivity. eapply or_iff_compat_r. apply in_map_iff. clear u. split. - intros [[e0 []]|H]. + exists e0. split. right; tas. congruence. + exists e'. split; tas. left; reflexivity. - intros [xx [[H|H] ?]]. + right. congruence. + left. exists xx. split; tas; congruence. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | map_spec | 1,066 |
(u : nonEmptyLevelExprSet) : LevelExprSet.elements u <> []. Proof. destruct u as [u1 u2]; cbn; intro e. unfold LevelExprSet.is_empty, LevelExprSet.elements, LevelExprSet.Raw.elements in *. rewrite e in u2; discriminate. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | elements_not_empty | 1,067 |
(u v : nonEmptyLevelExprSet) : u = v :> LevelExprSet.t -> u = v. Proof. destruct u as [u1 u2], v as [v1 v2]; cbn. intros X; destruct X. now rewrite (uip_bool _ _ u2 v2). Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_univ | 1,068 |
(u v : nonEmptyLevelExprSet) : LevelExprSet.Equal u v -> u = v. Proof. intro H. now apply eq_univ, LevelExprSet.eq_leibniz. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_univ' | 1,069 |
(u v : nonEmptyLevelExprSet) : LevelExprSet.elements u = LevelExprSet.elements v -> u = v. Proof. intro H. apply eq_univ. destruct u as [u1 u2], v as [v1 v2]; cbn in *; clear u2 v2. destruct u1 as [u1 u2], v1 as [v1 v2]; cbn in *. destruct H. now rewrite (uip_bool _ _ u2 v2). Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_univ'' | 1,070 |
(u v : nonEmptyLevelExprSet) : LevelExprSet.equal u v <-> u = v. Proof. split. - intros. apply eq_univ'. now apply LevelExprSet.equal_spec. - intros ->. now apply LevelExprSet.equal_spec. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | univ_expr_eqb_true_iff | 1,071 |
(u v : nonEmptyLevelExprSet) : LevelExprSet.equal u v <-> LevelExprSet.equal v u. Proof. transitivity (u = v). 2: transitivity (v = u). - apply univ_expr_eqb_true_iff. - split; apply eq_sym. - split; apply univ_expr_eqb_true_iff. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | univ_expr_eqb_comm | 1,072 |
f u : LevelExprSet.for_all f u = false -> LevelExprSet.exists_ (negb ∘ f) u. Proof. intro H. rewrite LevelExprSetFact.exists_b. rewrite LevelExprSetFact.for_all_b in H. all: try now intros x y []. induction (LevelExprSet.elements u); cbn in *; [discriminate|]. apply andb_false_iff in H; apply orb_true_iff; destruct H as [H|H]. left; now rewrite H. right; now rewrite IHl. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelExprSet_for_all_false | 1,073 |
(P : LevelExpr.t -> Prop) (u : nonEmptyLevelExprSet) : LevelExprSet.For_all P u <-> P (to_nonempty_list u).1 /\ Forall P (to_nonempty_list u).2. Proof. etransitivity. - eapply iff_forall; intro e. eapply imp_iff_compat_r. apply In_to_nonempty_list. - cbn; split. + intro H. split. apply H. now left. apply Forall_forall. intros x H0. apply H; now right. + intros [H1 H2] e [He|He]. subst e; tas. eapply Forall_forall in H2; tea. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | LevelExprSet_For_all_exprs | 1,074 |
nonEmptyLevelExprSet. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | t | 1,075 |
#[global, program] : ReflectEq t := { eqb x y := eqb x.(t_set) y.(t_set) }. Next Obligation. destruct (eqb_spec (t_set x) (t_set y)); constructor. destruct x, y; cbn in *. subst. now rewrite (uip t_ne0 t_ne1). intros e; subst x; apply H. reflexivity. Qed. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | levelexprset_reflect | 1,076 |
EqDec t := eq_dec. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | eq_dec_univ0 | 1,077 |
(e: LevelExpr.t) : t := singleton e. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | make | 1,078 |
(l: Level.t) : t := singleton (LevelExpr.make l). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | make' | 1,079 |
l l' : make' l = make' l' -> l = l'. Proof. destruct l, l' => //=; now inversion 1. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | make'_inj | 1,080 |
t -> LevelExpr.t * list LevelExpr.t := to_nonempty_list. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | exprs | 1,081 |
(u : t) : bool := LevelExprSet.for_all LevelExpr.is_level u. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | is_levels | 1,082 |
(u : t) : bool := (LevelExprSet.cardinal u =? 1)%nat && is_levels u. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | is_level | 1,083 |
(e : Level.t * nat) (es : list (Level.t * nat)) : t := add_list es (Universe.make e). | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | from_kernel_repr | 1,084 |
t -> t := map LevelExpr.succ. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | succ | 1,085 |
t -> t -> t := non_empty_union. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | sup | 1,086 |
(u : t) : option Level.t := match LevelExprSet.elements u with | [(l, 0%nat)] => Some l | _ => None end. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | get_is_level | 1,087 |
v e : val v (make e) = val v e. Proof. reflexivity. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_make | 1,088 |
v l : val v (make' l) = val v l. Proof. reflexivity. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_make' | 1,089 |
t -> t -> Prop := LevelExprSet.lt. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt | 1,090 |
Proper (eq ==> eq ==> iff) lt. Proof. repeat intro; subst; reflexivity. Qed. | Definition | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_compat | 1,091 |
StrictOrder lt. Proof. cbv [lt]; constructor. { intros ? H. apply irreflexivity in H; assumption. } { intros ??? H1 H2; etransitivity; tea. } Qed. | Instance | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | lt_strorder | 1,092 |
(u : Universe.t) v : val v u = fold_right (fun e x => Nat.max (val v e) x) (val v (Universe.exprs u).1) (List.rev (Universe.exprs u).2). Proof. unfold val at 1, Universe.Evaluable. destruct (Universe.exprs u). now rewrite fold_left_rev_right. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_fold_right | 1,093 |
(u : Universe.t) v e : LevelExprSet.In e u -> val v e <= val v u. Proof. intro H. rewrite val_fold_right. apply In_to_nonempty_list_rev in H. fold Universe.exprs in H; destruct (Universe.exprs u); cbn in *. destruct H as [H|H]. - subst. induction (List.rev l); cbnr. lia. - induction (List.rev l); cbn; invs H. + u; lia. + specialize (IHl0 H0). lia. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_In_le | 1,094 |
(u : Universe.t) v : exists e, LevelExprSet.In e u /\ val v e = val v u. Proof. eapply iff_ex. { intro. eapply and_iff_compat_r. apply In_to_nonempty_list_rev. } rewrite val_fold_right. fold Universe.exprs; destruct (Universe.exprs u) as [e l]; cbn in *. clear. induction (List.rev l); cbn. - exists e. split; cbnr. left; reflexivity. - destruct IHl0 as [e' [H1 H2]]. destruct (Nat.max_dec (val v a) (fold_right (fun e0 x0 => Nat.max (val v e0) x0) (val v e) l0)) as [H|H]; rewrite H; clear H. + exists a. split; cbnr. right. now constructor. + rewrite <- H2. exists e'. split; cbnr. destruct H1 as [H1|H1]; [now left|right]. now constructor 2. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_In_max | 1,095 |
(u : Universe.t) v k : (forall e, LevelExprSet.In e u -> val v e <= k) <-> val v u <= k. Proof. split. - eapply imp_iff_compat_r. { eapply iff_forall; intro. eapply imp_iff_compat_r. apply In_to_nonempty_list_rev. } rewrite val_fold_right. fold Universe.exprs; destruct (Universe.exprs u) as [e l]; cbn; clear. induction (List.rev l); cbn. + intros H. apply H. left; reflexivity. + intros H. destruct (Nat.max_dec (val v a) (fold_right (fun e0 x => Nat.max (val v e0) x) (val v e) l0)) as [H'|H']; rewrite H'; clear H'. * apply H. right. now constructor. * apply IHl0. intros x [H0|H0]; apply H. now left. right; now constructor 2. - intros H e He. eapply val_In_le in He. etransitivity; eassumption. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_ge_caract | 1,096 |
(u : Universe.t) v k : (exists e, LevelExprSet.In e u /\ k <= val v e) <-> k <= val v u. Proof. split. - eapply imp_iff_compat_r. { eapply iff_ex; intro. eapply and_iff_compat_r. apply In_to_nonempty_list_rev. } rewrite val_fold_right. fold Universe.exprs; destruct (Universe.exprs u) as [e l]; cbn; clear. induction (List.rev l); cbn. + intros H. destruct H as [e' [[H1|H1] H2]]. * now subst. * invs H1. + intros [e' [[H1|H1] H2]]. * forward IHl0; [|lia]. exists e'. split; tas. left; assumption. * invs H1. -- u; lia. -- forward IHl0; [|lia]. exists e'. split; tas. right; assumption. - intros H. destruct (val_In_max u v) as [e [H1 H2]]. exists e. rewrite H2; split; assumption. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_le_caract | 1,097 |
(u : Universe.t) v k : val v u = k <-> (forall e, LevelExprSet.In e u -> val v e <= k) /\ exists e, LevelExprSet.In e u /\ val v e = k. Proof. split. - intros <-; split. + apply val_In_le. + apply val_In_max. - intros [H1 H2]. apply val_ge_caract in H1. assert (k <= val v u); [clear H1|lia]. apply val_le_caract. destruct H2 as [e [H2 H2']]. exists e. split; tas. lia. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_caract | 1,098 |
v e (s: Universe.t) : val v (add e s) = Nat.max (val v e) (val v s). Proof. apply val_caract. split. - intros e' H. apply LevelExprSet.add_spec in H. destruct H as [H|H]. + subst. u; lia. + eapply val_In_le with (v:=v) in H. lia. - destruct (Nat.max_dec (val v e) (val v s)) as [H|H]; rewrite H; clear H. + exists e. split; cbnr. apply LevelExprSetFact.add_1. reflexivity. + destruct (val_In_max s v) as [e' [H1 H2]]. exists e'. split; tas. now apply LevelExprSetFact.add_2. Qed. | Lemma | common | From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL. From Equations Require Import Equations. From MetaCoq.Utils Require Import utils MCMSets MCFSets. From MetaCoq.Common Require Import BasicAst config. Require Import ssreflect. Import NonEmptySetFacts. | common\theories\Universes.v | val_add | 1,099 |
Subsets and Splits