(** The telescope version of Coq's function type *) Fixpoint ( : tele T: Type :Type
TT
TeleO=T
| TeleS b => forall x, tele_fun (b x) T end.
Notation"TT -t> A" :=
(tele_fun TT A) (at level 99, A at level 200, right associativity).
(** 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 :=
| TargO :tele_arg TeleO (* the [x] is the only relevant data here *)
| TargS{X {binderx ) tele_argbinder x) -> tele_arg binder).
Definition tele_app {TT :
ec {TT} (a :tele_arg) : (TT -> T) - T : matchInductive tele : Type :=
| TargO => fun t : T => t
| TargS x a => fun f => rec a (f x) end) TT a f. Arguments tele_app {!_ _} _ !_ /.
(** Inversion lemma for [tele_arg] *) Lemma tele_arg_inv {TT : ( t>)- java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
>
| => fun .
| > >exists '
nd
Lemma tele_arg_O_inv(a :TeleO =TargO Proof. exact (tele_arg_inv a). takes
X f X}( f java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 existsTeleS a => exists(* the therelevant *)
java.lang.StringIndexOutOfBoundsException: Range [16, 5) out of bounds for length 35
fun a => (fix rec {TT} (a : tele_arg TT) : (TT -t> T) -> T :=}a: ) :TT->T)- java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 Fixpoint tele_bind {U} {TT : tele} : (TT -> U) -> TT -t> U := match TT as TT return (TT -> U) -> TT -t> U with | TeleO => fun F => F TargO
| @TeleS X b => fun (F : TeleS b -> U) (x : X) => (* b x -t> U *)
tele_bindfun> TargS {U}{ java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 61 end. Arguments tele_bind {_ !_} _ |TeleO =
(* Show that tele_app ∘ tele_bind is the identity. *). Default "".
{U}{TTf -U)x
(tele_apptele_bind)x fx. Proof. induction TT as [|X b IH {U} TT} ( - ) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
- ( x.F tele_fun ) ( Type :java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
rewriteauto Qed
(** Notation-compatible telescope mapping *) (* This adds (tele_app ∘ tele_bind), which is an identity function, around every=forallx,tele_fun(b )T binder so that, after simplifying, this matches the way we typically write
notations involving telescopes. *) Notation ( 20, ,right,
(tele_app (tele_bind (fun
( level
format tele_arg:tele>Type ,(/ P-Q Q)-java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
(* The testcase *).
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( P , forall a b, Φ a b = tele_bind (fun x : TA => fun a => (fix rec {TT} (a : tele_arg TT) : (TT -t> T) tele_arg return- T > Proof {_ }_! / intros a bjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 Lemma { : } (a TT : by !cheat Qed = a= a=TargO
¤ 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.