Built with Alectryon, running Coq+SerAPI v8.16.0+0.16.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
From Tealeaves Require Export
Examples.STLC.Syntax
Simplification.Tests.Support.Import STLC.Syntax.TermNotations.(** * Simplification tests for derived operations *)(******************************************************************************)(** ** Rewriting lemmas for <<mapdReduce>> *)(******************************************************************************)Sectionterm_mapdReduce_rewrite.Context {AM : Type} (f : nat * A -> M) `{Monoid M}.
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
foralla : A, mapdReduce f (tvar a) = f (Ƶ, a)
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
foralla : A, mapdReduce f (tvar a) = f (Ƶ, a)
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M a: A
mapdReduce f (tvar a) = f (Ƶ, a)
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M a: A
f (Ƶ, a) = f (Ƶ, a)
reflexivity.Qed.
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
forall (X : typ) (t : Lam A),
mapdReduce f ((λ) X t) = mapdReduce (f ⦿ 1) t
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
forall (X : typ) (t : Lam A),
mapdReduce f ((λ) X t) = mapdReduce (f ⦿ 1) t
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M X: typ t: Lam A
mapdReduce f ((λ) X t) = mapdReduce (f ⦿ 1) t
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M X: typ t: Lam A
mapdReduce (f ⦿ 1) t = mapdReduce (f ⦿ 1) t
reflexivity.Qed.
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
forallt1t2 : Lam A,
mapdReduce f (⟨ t1 ⟩ (t2)) =
mapdReduce f t1 ● mapdReduce f t2
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M
forallt1t2 : Lam A,
mapdReduce f (⟨ t1 ⟩ (t2)) =
mapdReduce f t1 ● mapdReduce f t2
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M t1, t2: Lam A
mapdReduce f (⟨ t1 ⟩ (t2)) =
mapdReduce f t1 ● mapdReduce f t2
A, M: Type f: nat * A -> M op: Monoid_op M unit0: Monoid_unit M H: Monoid M t1, t2: Lam A
mapdReduce f t1 ● mapdReduce f t2 =
mapdReduce f t1 ● mapdReduce f t2
reflexivity.Qed.Endterm_mapdReduce_rewrite.(** ** Rewriting lemmas for <<∈d>> *)(******************************************************************************)Sectionterm_ind_rewrite.
forall (l1l2 : LN) (n : nat),
(n, l1) ∈d tvar l2 <-> n = Ƶ /\ l1 = l2
forall (l1l2 : LN) (n : nat),
(n, l1) ∈d tvar l2 <-> n = Ƶ /\ l1 = l2
l1, l2: LN n: nat
(n, l1) ∈d tvar l2 <-> n = Ƶ /\ l1 = l2
l1, l2: LN n: nat
n = Ƶ /\ l1 = l2 <-> n = Ƶ /\ l1 = l2
conclude.Qed.
forall (t : term) (l : LN) (n : nat) (X : typ),
(n, l) ∈d t = (S n, l) ∈d (λ) X t
forall (t : term) (l : LN) (n : nat) (X : typ),
(n, l) ∈d t = (S n, l) ∈d (λ) X t
t: term l: LN n: nat X: typ
(n, l) ∈d t = (S n, l) ∈d (λ) X t
t: term l: LN n: nat X: typ
(n, l) ∈d t = (n, l) ∈d t
conclude.Qed.
forall (t : term) (l : LN) (n : nat) (X : typ),
(n, l) ∈d (λ) X t -> n <> 0
forall (t : term) (l : LN) (n : nat) (X : typ),
(n, l) ∈d (λ) X t -> n <> 0
t: term l: LN n: nat X: typ
(n, l) ∈d (λ) X t -> n <> 0
t: term l: LN X: typ
(0, l) ∈d (λ) X t -> 0 <> 0
t: term l: LN n: nat X: typ
(S n, l) ∈d (λ) X t -> S n <> 0
t: term l: LN X: typ
(0, l) ∈d (λ) X t -> 0 <> 0
t: term l: LN X: typ
mapdReduce (const False) t -> 0 <> 0
t: term l: LN X: typ
False -> 0 <> 0
easy.
t: term l: LN n: nat X: typ
(S n, l) ∈d (λ) X t -> S n <> 0
t: term l: LN n: nat X: typ
(n, l) ∈d t -> S n <> 0
easy.Qed.(* TODO: This is a good example for improving simplify execution times. *)