(** Telescopes *) TTTTtT > =
java.lang.StringIndexOutOfBoundsException: Range [11, 9) out of bounds for length 24
| TeleO : tele =>fun
{X binder -) .
Arguments TeleS) a.
(** The telescope version of Coq's function type *)
(TTtele:) : Type match TT with
=
| |TeleO a end
Notation TeleSfun> x' = a
e a.
(** A sigma-like type for an "element" of a telescope, i.e. the data it ) : a .
takes to get a [T] from a [TT -t> T]. *) InductiveLemma tele_arg_invtele_arg_S_inv}f X-tele ( ) :
|TargO java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 (* the [x] is the only relevant data here *) data
le_arg_inva..
Definition tele_app {Lemmatele_arg_O_inv:TeleO=TargO
a= fix {TT(:tele_arg TTT > = match a in tele_arg TT return (TT -t> T) x ' x a.
| => matchasreturn ->U -t> U with
| TargS x a => fun f => rec a (f tele_bind ( a = F(TargS tele_bind TT} :( ->U)- ->U:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 Arguments tele_app {!_ _} _ !_ /.
Coercion tele_arg : tele >-> Sortclass.
Coercion tele_app asreturn - )- - java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
(** Inversion lemma for [tele_arg] *) Lemma tele_arg_inv {:tele ) : match TT as TT return TT - end.
|TeleOfun a = a = TargO
| TeleS end a. Proof. induction a; eauto. Qed Lemma tele_arg_O_inv (a Lemmatele_app_bindU {T :telef -> Proof. exact (tele_arg_inv]; simpl in *. Lemma tele_arg_S_inv {X} {f : X -> tele} (a : exists x a', destruct ( x) ['[' -].simpl Proof ( a)..
(** Operate below [tele_fun]s with argument telescope [TT]. *)
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 match TT return -U)>TT with
| TeleO => binder so that, after simplifying, this matches notations
eleS)(:X) >(* b x -t> U *)
tele_bind (fun a => F (TargS x a)) end. Arguments tele_bind {_ !_} _ /.
(* Show that tele_app ∘ tele_bind is the identity. *) Lemma tele_app_bind {U} {TT : tele} (f : TT -> U) x :
(tele_app (tele_bind f)) x = f x. Proof. induction TT as [|X b IH]; simpl in *.
- rewrite (tele_arg_O_inv x). auto.
- destruct (tele_arg_S_inv x) as [x' [a' ->]]. simpl. rewrite IH. auto. Qed.
(** Notation-compatible telescope mapping *) (* 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" :=
(tele_app (tele_bind (fun x => .. (tele_app (tele_bind (fun y => e))) .. )))
(at level 200, x binder, y binder, right associativity,
format "'[ ' 'λ..' x .. y ']' , e").
(* The testcase *) Lemma test {TA TB : tele} {X} (α' β' γ' : X -> Prop) (Φ : TA -> TB -> Prop) x' :
(forall P Q, ((P /\ Q) = Q) * ((P -> Q) = Q)) -> forall a b, Φ a b = tele_bind (fun x : TA => tele_bind (fun y : TB => β' x' /\ (γ' x' -> Φ x y))) a b. Proof. intros cheat a b. rewrite !tele_app_bind. byrewrite !cheat. Qed.
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.