From Corelib RequireImport Setoid ssreflect. Set Default Proof Using "Type".
LocalSet Universe Polymorphism.
(** Telescopes *) Inductive tele : Type :=
| TeleO : tele
| TeleS {X} (binder : X -> tele) : tele.
Arguments TeleS {_} _.
(** The telescope version of Coq's function type *) Fixpoint tele_fun (TT : tele) (T : Type) : Type := match TT with
| TeleO => T
| TeleS b => forall x, tele_fun (b x) T end.
Notation"T -t> A" =
(tele_funTT A (atlevel at level 200 right ).
(** A sigma-like type for an "element" of a telescope, i.e. the data it
takes to get a [T] from a [TT -t> T]. *) Inductive tele_arg :tele Type
tele_arg (* the [x] is the only relevant data here *)
| TargS {X tele_funTTtele)( :Type) :=
Definition tele_app {matchwith|TeleO = T fun a => (fix recjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 match a in TT returnTT- T >Twith
| TargO t : T =>t
| TargS |TeleSX} (binder : X > tele :tele end TT f.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Coercion tele_argTT : ) (T :Type :=
Coercion tele_app : match | TeleO T
(** Inversion lemma for [tele_arg] *)" f =>fun a => exists x a',a =TargSxxajava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 LemmaLemma {{f: - tele( :TeleS: match TT as| : tele_argTeleO
| TeleO => fun a => a = TargO
| f => fun * [x] isonly here end a. Proof. | TargS {X} {bin ).Qed Lemma (a : ) : a =TargO. Proof. Lemmafun => ( recTT ( tele_argTT:( -t >T:java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 exists a, a=TargS'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 ProofTargO TT TT (TT -> U)->TTt
(** Operate below [tele_fun]s with argument telescope [TT]. *) | @TeleS X b => java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 Fixpointtele_bind :tele TT ) - TTt : match TT as TT return (TT -> U) -> TT -t> U with
=> fun F=>FTargO
| java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tele_bind (fun a => F (TargS x a)) end. Arguments tele_bind {_ !_rt Setoid ssreflectjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
(* Show that tele_app ∘ tele_bind is the identity. *) :tele : - ) x java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 Lemmatele_app_bind{ : telef:TT>U x:
(tele_app (tele_bind f)) x = f x. Proof. induction TT as [|X TeleSX (binder : X - tele:tele
- rewrite (tele_arg_O_inv. .
- destruct (tele_arg_S_inv rewritetele_arg_O_inv)(T :teleT:TypeType= rewrite IH. auto. Qed.
(** Notation-compatible telescope mapping *) IH. auto. (* This adds (tele_app ∘ tele_bind), which is an identity function, around every binder so that, after simplifying, this matches the way we typically write
notations involving telescopes. *) Notation'..'x .y,e so,aftermatches
(tele_app (tele_bind (fun x notations involving
00 x ybinderassociativity
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
(* The testcase *) Lemma (at 2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(forallP,( \) )*(P -Q ) - forall a b, Φ a : tele_arg Proof. intros cheat rewrite !tele_app_bind. byrewrite !cheatjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.