url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
input
stringlengths
73
2.09M
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamMul.lean
Etch.Verification.Stream.mul_spec
[156, 1]
[167, 9]
rw [Stream.eval_valid _ ⟨_, hv⟩, ih _ ((a.mul b).next_wf ⟨q, hv⟩), next_eval_mul_eq _ _ ⟨_, hv⟩, mul_eval₀_spec _ _ a.strictMono b.strictMono ⟨_, hv⟩]
case pos ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true ⊢ eval (mul a b) q = eval a q.1 * eval b q.2
case pos ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true ⊢ Finsupp.filter (fun i => (i, false) < toOrder (mul a b) { val := q, property := hv }) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) + Finsupp.filter (fun i => toOrder (mul a b) { val := q, property := hv } ≤ (i, false)) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) = eval a q.1 * eval b q.2
Please generate a tactic in lean4 to solve the state. STATE: case pos ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true ⊢ eval (mul a b) q = eval a q.1 * eval b q.2 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamMul.lean
Etch.Verification.Stream.mul_spec
[156, 1]
[167, 9]
convert Finsupp.filter_pos_add_filter_neg (α := ι) (M := α) ..
case pos ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true ⊢ Finsupp.filter (fun i => (i, false) < toOrder (mul a b) { val := q, property := hv }) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) + Finsupp.filter (fun i => toOrder (mul a b) { val := q, property := hv } ≤ (i, false)) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) = eval a q.1 * eval b q.2
case h.e'_2.h.e'_6.h.e'_4.h.a ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true x✝ : ι ⊢ toOrder (mul a b) { val := q, property := hv } ≤ (x✝, false) ↔ ¬(x✝, false) < toOrder (mul a b) { val := q, property := hv }
Please generate a tactic in lean4 to solve the state. STATE: case pos ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true ⊢ Finsupp.filter (fun i => (i, false) < toOrder (mul a b) { val := q, property := hv }) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) + Finsupp.filter (fun i => toOrder (mul a b) { val := q, property := hv } ≤ (i, false)) (eval a ↑(mul.valid.fst { val := q, property := hv }) * eval b ↑(mul.valid.snd { val := q, property := hv })) = eval a q.1 * eval b q.2 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamMul.lean
Etch.Verification.Stream.mul_spec
[156, 1]
[167, 9]
simp
case h.e'_2.h.e'_6.h.e'_4.h.a ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true x✝ : ι ⊢ toOrder (mul a b) { val := q, property := hv } ≤ (x✝, false) ↔ ¬(x✝, false) < toOrder (mul a b) { val := q, property := hv }
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.e'_2.h.e'_6.h.e'_4.h.a ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : (mul a b).σ ih : ∀ (y : (mul a b).σ), WfRel (mul a b) y q → eval (mul a b) y = eval a y.1 * eval b y.2 hv : (mul a b).valid q = true x✝ : ι ⊢ toOrder (mul a b) { val := q, property := hv } ≤ (x✝, false) ↔ ¬(x✝, false) < toOrder (mul a b) { val := q, property := hv } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamMul.lean
Etch.Verification.Stream.mul_seek_spec
[169, 1]
[173, 58]
simp only [Finsupp.mul_apply, mul_spec]
ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : { q // (mul a b).valid q = true } i : Lex (ι × Bool) j : ι h : i ≤ (j, false) ⊢ (eval (mul a b) ((mul a b).seek q i)) j = (eval (mul a b) ↑q) j
ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : { q // (mul a b).valid q = true } i : Lex (ι × Bool) j : ι h : i ≤ (j, false) ⊢ (eval a ((mul a b).seek q i).1) j * (eval b ((mul a b).seek q i).2) j = (eval a (↑q).1) j * (eval b (↑q).2) j
Please generate a tactic in lean4 to solve the state. STATE: ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : { q // (mul a b).valid q = true } i : Lex (ι × Bool) j : ι h : i ≤ (j, false) ⊢ (eval (mul a b) ((mul a b).seek q i)) j = (eval (mul a b) ↑q) j TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamMul.lean
Etch.Verification.Stream.mul_seek_spec
[169, 1]
[173, 58]
congr 1 <;> dsimp <;> rw [IsLawful.seek_spec] <;> aesop
ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : { q // (mul a b).valid q = true } i : Lex (ι × Bool) j : ι h : i ≤ (j, false) ⊢ (eval a ((mul a b).seek q i).1) j * (eval b ((mul a b).seek q i).2) j = (eval a (↑q).1) j * (eval b (↑q).2) j
ι : Type inst : LinearOrder ι α : Type u inst_1 : NonUnitalNonAssocSemiring α a b : Stream ι α inst_2 : IsStrictLawful a inst_3 : IsStrictLawful b i : Lex (ι × Bool) j : ι h : i ≤ (j, false) val : (mul a b).σ property : (mul a b).valid val = true ⊢ (eval a (a.seek (mul.valid.fst { val := val, property := property }) i)) j = (eval a val.1) j ι : Type inst : LinearOrder ι α : Type u inst_1 : NonUnitalNonAssocSemiring α a b : Stream ι α inst_2 : IsStrictLawful a inst_3 : IsStrictLawful b i : Lex (ι × Bool) j : ι h : i ≤ (j, false) val : (mul a b).σ property : (mul a b).valid val = true ⊢ (eval b (b.seek (mul.valid.snd { val := val, property := property }) i)) j = (eval b val.2) j
Please generate a tactic in lean4 to solve the state. STATE: ι : Type inst✝³ : LinearOrder ι α : Type u inst✝² : NonUnitalNonAssocSemiring α a b : Stream ι α inst✝¹ : IsStrictLawful a inst✝ : IsStrictLawful b q : { q // (mul a b).valid q = true } i : Lex (ι × Bool) j : ι h : i ≤ (j, false) ⊢ (eval a ((mul a b).seek q i).1) j * (eval b ((mul a b).seek q i).2) j = (eval a (↑q).1) j * (eval b (↑q).2) j TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.min?_mem
[16, 1]
[19, 54]
rw [min?_eq_toList_head?] at h
α : Type u_1 a : α t : RBNode α h : RBNode.min? t = some a ⊢ a ∈ t
α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ t
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α t : RBNode α h : RBNode.min? t = some a ⊢ a ∈ t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.min?_mem
[16, 1]
[19, 54]
rw [← mem_toList]
α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ t
α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ toList t
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.min?_mem
[16, 1]
[19, 54]
revert h
α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ toList t
α : Type u_1 a : α t : RBNode α ⊢ List.head? (toList t) = some a → a ∈ toList t
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α t : RBNode α h : List.head? (toList t) = some a ⊢ a ∈ toList t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.min?_mem
[16, 1]
[19, 54]
cases toList t <;> rintro ⟨⟩
α : Type u_1 a : α t : RBNode α ⊢ List.head? (toList t) = some a → a ∈ toList t
case cons.refl α : Type u_1 a : α t : RBNode α tail✝ : List α ⊢ a ∈ a :: tail✝
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α t : RBNode α ⊢ List.head? (toList t) = some a → a ∈ toList t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.min?_mem
[16, 1]
[19, 54]
constructor
case cons.refl α : Type u_1 a : α t : RBNode α tail✝ : List α ⊢ a ∈ a :: tail✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.refl α : Type u_1 a : α t : RBNode α tail✝ : List α ⊢ a ∈ a :: tail✝ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
rw [min?_eq_toList_head?] at h
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : RBNode.min? t = some a x : α hx : x ∈ t ⊢ cmp a x ≠ Ordering.gt
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ t ⊢ cmp a x ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : RBNode.min? t = some a x : α hx : x ∈ t ⊢ cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
rw [← mem_toList] at hx
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ t ⊢ cmp a x ≠ Ordering.gt
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t ⊢ cmp a x ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ t ⊢ cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
have := ht.toList_sorted
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t ⊢ cmp a x ≠ Ordering.gt
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t this : List.Pairwise (cmpLT cmp) (toList t) ⊢ cmp a x ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t ⊢ cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
revert h hx this
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t this : List.Pairwise (cmpLT cmp) (toList t) ⊢ cmp a x ≠ Ordering.gt
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α ⊢ List.head? (toList t) = some a → x ∈ toList t → List.Pairwise (cmpLT cmp) (toList t) → cmp a x ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : List.head? (toList t) = some a x : α hx : x ∈ toList t this : List.Pairwise (cmpLT cmp) (toList t) ⊢ cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
cases toList t <;> rintro ⟨⟩ (_ | ⟨_, hx⟩) (_ | ⟨h1,h2⟩)
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α ⊢ List.head? (toList t) = some a → x ∈ toList t → List.Pairwise (cmpLT cmp) (toList t) → cmp a x ≠ Ordering.gt
case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a a ≠ Ordering.gt case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a x ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α ⊢ List.head? (toList t) = some a → x ∈ toList t → List.Pairwise (cmpLT cmp) (toList t) → cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
rw [OrientedCmp.cmp_refl (cmp := cmp)]
case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a a ≠ Ordering.gt
case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.eq ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a a ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
decide
case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.eq ≠ Ordering.gt
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.refl.head.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t tail✝ : List α h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.eq ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
rw [(h1 _ hx).1]
case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a x ≠ Ordering.gt
case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.lt ≠ Ordering.gt
Please generate a tactic in lean4 to solve the state. STATE: case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ cmp a x ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.min?_le
[21, 1]
[28, 29]
decide
case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.lt ≠ Ordering.gt
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.refl.tail.cons α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t x : α tail✝ : List α hx : List.Mem x tail✝ h2 : List.Pairwise (cmpLT cmp) tail✝ h1 : ∀ (a' : α), a' ∈ tail✝ → cmpLT cmp a a' ⊢ Ordering.lt ≠ Ordering.gt TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.max?_mem
[30, 1]
[31, 50]
simpa using min?_mem ((min?_reverse _).trans h)
α : Type u_1 a : α t : RBNode α h : RBNode.max? t = some a ⊢ a ∈ t
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α t : RBNode α h : RBNode.max? t = some a ⊢ a ∈ t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBNode.Ordered.le_max?
[33, 1]
[35, 70]
simpa using hx
α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : RBNode.max? t = some a x : α hx : x ∈ t ⊢ x ∈ reverse t
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering a : α t : RBNode α inst✝ : TransCmp cmp ht : Ordered cmp t h : RBNode.max? t = some a x : α hx : x ∈ t ⊢ x ∈ reverse t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.isEmpty_iff_toList_eq_nil
[48, 1]
[49, 83]
obtain ⟨⟨⟩, _⟩ := t <;> simp [toList, isEmpty]
α : Type u_1 cmp : α → α → Ordering t : RBSet α cmp ⊢ isEmpty t = true ↔ toList t = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering t : RBSet α cmp ⊢ isEmpty t = true ↔ toList t = [] TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_some
[60, 1]
[62, 53]
simp [mem_toList]
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering y : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp ⊢ y ∈ t.val ∧ cut y = Ordering.eq ↔ y ∈ toList t ∧ cut y = Ordering.eq
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering y : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp ⊢ y ∈ t.val ∧ cut y = Ordering.eq ↔ y ∈ toList t ∧ cut y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
refine Option.ext fun u => findP?_some.trans <| .trans (and_congr_left fun h' => ?_) findP?_some.symm
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq ⊢ findP? (insert t v) cut = findP? t cut
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ u ∈ toList (insert t v) ↔ u ∈ toList t
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq ⊢ findP? (insert t v) cut = findP? t cut TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
rw [mem_toList_insert, or_iff_left, and_iff_left]
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ u ∈ toList (insert t v) ↔ u ∈ toList t
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ find? t v ≠ some u α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ ¬u = v
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ u ∈ toList (insert t v) ↔ u ∈ toList t TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
exact mt (fun h => by rwa [IsCut.congr (cut := cut) (find?_some_eq_eq h)]) h
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ find? t v ≠ some u
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ find? t v ≠ some u TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
rwa [IsCut.congr (cut := cut) (find?_some_eq_eq h)]
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h✝ : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq h : find? t v = some u ⊢ cut v = Ordering.eq
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h✝ : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq h : find? t v = some u ⊢ cut v = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
rintro rfl
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ ¬u = v
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp u : α h' : cut u = Ordering.eq h : cut u ≠ Ordering.eq ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering v : α inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp h : cut v ≠ Ordering.eq u : α h' : cut u = Ordering.eq ⊢ ¬u = v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert_of_ne
[71, 1]
[77, 30]
contradiction
α : Type u_1 cmp : α → α → Ordering cut : α → Ordering inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp u : α h' : cut u = Ordering.eq h : cut u ≠ Ordering.eq ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering cut : α → Ordering inst✝¹ : TransCmp cmp inst✝ : IsStrictCut cmp cut t : RBSet α cmp u : α h' : cut u = Ordering.eq h : cut u ≠ Ordering.eq ⊢ False TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.findP?_insert
[79, 1]
[81, 79]
split <;> [exact findP?_insert_of_eq t ‹_›; exact findP?_insert_of_ne t ‹_›]
α : Type u_1 cmp : α → α → Ordering inst✝¹ : TransCmp cmp t : RBSet α cmp v : α cut : α → Ordering inst✝ : IsStrictCut cmp cut ⊢ findP? (insert t v) cut = if cut v = Ordering.eq then some v else findP? t cut
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering inst✝¹ : TransCmp cmp t : RBSet α cmp v : α cut : α → Ordering inst✝ : IsStrictCut cmp cut ⊢ findP? (insert t v) cut = if cut v = Ordering.eq then some v else findP? t cut TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.isEmpty_iff_eq_empty
[83, 1]
[88, 9]
obtain ⟨⟨⟩, _⟩ := t <;> simp [isEmpty]
α : Type u_1 cmp : α → α → Ordering t : RBSet α cmp ⊢ isEmpty t = true ↔ t = ∅
case mk.nil α : Type u_1 cmp : α → α → Ordering property✝ : RBNode.WF cmp RBNode.nil ⊢ { val := RBNode.nil, property := property✝ } = ∅ case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ ¬{ val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } = ∅
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering t : RBSet α cmp ⊢ isEmpty t = true ↔ t = ∅ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.isEmpty_iff_eq_empty
[83, 1]
[88, 9]
rfl
case mk.nil α : Type u_1 cmp : α → α → Ordering property✝ : RBNode.WF cmp RBNode.nil ⊢ { val := RBNode.nil, property := property✝ } = ∅
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mk.nil α : Type u_1 cmp : α → α → Ordering property✝ : RBNode.WF cmp RBNode.nil ⊢ { val := RBNode.nil, property := property✝ } = ∅ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.isEmpty_iff_eq_empty
[83, 1]
[88, 9]
change _ ≠ Subtype.mk _ _
case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ ¬{ val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } = ∅
case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ { val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } ≠ { val := RBNode.nil, property := ⋯ }
Please generate a tactic in lean4 to solve the state. STATE: case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ ¬{ val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } = ∅ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBSet.isEmpty_iff_eq_empty
[83, 1]
[88, 9]
simp
case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ { val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } ≠ { val := RBNode.nil, property := ⋯ }
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mk.node α : Type u_1 cmp : α → α → Ordering c✝ : RBColor l✝ : RBNode α v✝ : α r✝ : RBNode α property✝ : RBNode.WF cmp (RBNode.node c✝ l✝ v✝ r✝) ⊢ { val := RBNode.node c✝ l✝ v✝ r✝, property := property✝ } ≠ { val := RBNode.nil, property := ⋯ } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some_mem_toList
[141, 1]
[144, 69]
obtain ⟨⟨y, v⟩, h', rfl⟩ := Option.map_eq_some'.1 h
α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α v : β t : RBMap α β cmp h : find? t x = some v ⊢ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq
case intro.mk.intro α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α t : RBMap α β cmp y : α v : β h' : findEntry? t x = some (y, v) h : find? t x = some (y, v).snd ⊢ ∃ y_1, (y_1, (y, v).snd) ∈ toList t ∧ cmp x y_1 = Ordering.eq
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α v : β t : RBMap α β cmp h : find? t x = some v ⊢ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some_mem_toList
[141, 1]
[144, 69]
exact ⟨_, findEntry?_some_mem_toList h', findEntry?_some_eq_eq h'⟩
case intro.mk.intro α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α t : RBMap α β cmp y : α v : β h' : findEntry? t x = some (y, v) h : find? t x = some (y, v).snd ⊢ ∃ y_1, (y_1, (y, v).snd) ∈ toList t ∧ cmp x y_1 = Ordering.eq
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.mk.intro α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α t : RBMap α β cmp y : α v : β h' : findEntry? t x = some (y, v) h : find? t x = some (y, v).snd ⊢ ∃ y_1, (y_1, (y, v).snd) ∈ toList t ∧ cmp x y_1 = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
simp [find?, findEntry?_some]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ find? t x = some v ↔ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq
α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) ↔ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ find? t x = some v ↔ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
constructor
α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) ↔ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq
case mp α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) → ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq case mpr α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq) → ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) ↔ ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
rintro ⟨_, h, rfl⟩
case mp α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) → ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq
case mp.intro.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α inst✝ : TransCmp cmp t : RBMap α β cmp w✝ : α × β h : w✝ ∈ toList t ∧ cmp x w✝.fst = Ordering.eq ⊢ ∃ y, (y, w✝.snd) ∈ toList t ∧ cmp x y = Ordering.eq
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v) → ∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
exact ⟨_, h⟩
case mp.intro.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α inst✝ : TransCmp cmp t : RBMap α β cmp w✝ : α × β h : w✝ ∈ toList t ∧ cmp x w✝.fst = Ordering.eq ⊢ ∃ y, (y, w✝.snd) ∈ toList t ∧ cmp x y = Ordering.eq
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp.intro.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α inst✝ : TransCmp cmp t : RBMap α β cmp w✝ : α × β h : w✝ ∈ toList t ∧ cmp x w✝.fst = Ordering.eq ⊢ ∃ y, (y, w✝.snd) ∈ toList t ∧ cmp x y = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
rintro ⟨b, h⟩
case mpr α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq) → ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v
case mpr.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp b : α h : (b, v) ∈ toList t ∧ cmp x b = Ordering.eq ⊢ ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ (∃ y, (y, v) ∈ toList t ∧ cmp x y = Ordering.eq) → ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_some
[165, 1]
[169, 37]
exact ⟨_, h, rfl⟩
case mpr.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp b : α h : (b, v) ∈ toList t ∧ cmp x b = Ordering.eq ⊢ ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr.intro α : Type u_1 cmp : α → α → Ordering β : Type u_2 x : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp b : α h : (b, v) ∈ toList t ∧ cmp x b = Ordering.eq ⊢ ∃ a, (a ∈ toList t ∧ cmp x a.fst = Ordering.eq) ∧ a.snd = v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.contains_iff_find?
[174, 1]
[176, 63]
simp [contains_iff_findEntry?, find?, and_comm, exists_comm]
α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α t : RBMap α β cmp ⊢ contains t x = true ↔ ∃ v, find? t x = some v
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering x : α t : RBMap α β cmp ⊢ contains t x = true ↔ ∃ v, find? t x = some v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.findEntry?_congr
[190, 1]
[191, 90]
simp [findEntry?, TransCmp.cmp_congr_left' h]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k₁ k₂ : α inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k₁ k₂ = Ordering.eq ⊢ findEntry? t k₁ = findEntry? t k₂
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 k₁ k₂ : α inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k₁ k₂ = Ordering.eq ⊢ findEntry? t k₁ = findEntry? t k₂ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_congr
[193, 1]
[194, 69]
simp [find?, findEntry?_congr _ h]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k₁ k₂ : α inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k₁ k₂ = Ordering.eq ⊢ find? t k₁ = find? t k₂
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 k₁ k₂ : α inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k₁ k₂ = Ordering.eq ⊢ find? t k₁ = find? t k₂ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert_of_eq
[199, 1]
[200, 88]
rw [find?, findEntry?_insert_of_eq _ h]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k = Ordering.eq ⊢ find? (insert t k v) k' = some v
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k = Ordering.eq ⊢ Option.map (fun x => x.snd) (some (k, v)) = some v
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k = Ordering.eq ⊢ find? (insert t k v) k' = some v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert_of_eq
[199, 1]
[200, 88]
rfl
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k = Ordering.eq ⊢ Option.map (fun x => x.snd) (some (k, v)) = some v
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k = Ordering.eq ⊢ Option.map (fun x => x.snd) (some (k, v)) = some v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert_of_ne
[205, 1]
[206, 89]
simp [find?, findEntry?_insert_of_ne _ h]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k ≠ Ordering.eq ⊢ find? (insert t k v) k' = find? t k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k ≠ Ordering.eq ⊢ find? (insert t k v) k' = find? t k' TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert
[212, 1]
[214, 77]
split <;> [exact find?_insert_of_eq t ‹_›; exact find?_insert_of_ne t ‹_›]
α : Type u_1 cmp : α → α → Ordering β : Type u_2 inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α ⊢ find? (insert t k v) k' = if cmp k' k = Ordering.eq then some v else find? t k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 cmp : α → α → Ordering β : Type u_2 inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α ⊢ find? (insert t k v) k' = if cmp k' k = Ordering.eq then some v else find? t k' TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert_self
[221, 9]
[222, 106]
rw [find?_insert_of_eq]
α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ find? (insert t k v) k = some v
case h α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ cmp k k = Ordering.eq
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ find? (insert t k v) k = some v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.find?_insert_self
[221, 9]
[222, 106]
rw [OrientedCmp.cmp_refl (cmp := cmp)]
case h α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ cmp k k = Ordering.eq
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp ⊢ cmp k k = Ordering.eq TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.findD_insert
[224, 1]
[226, 49]
simp only [findD, find?_insert]
α : Type u_1 β : Type u_2 cmp : α → α → Ordering inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α d : β ⊢ findD (insert t k v) k' d = if cmp k' k = Ordering.eq then v else findD t k' d
α : Type u_1 β : Type u_2 cmp : α → α → Ordering inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α d : β ⊢ Option.getD (if cmp k' k = Ordering.eq then some v else find? t k') d = if cmp k' k = Ordering.eq then v else Option.getD (find? t k') d
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α d : β ⊢ findD (insert t k v) k' d = if cmp k' k = Ordering.eq then v else findD t k' d TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.findD_insert
[224, 1]
[226, 49]
split <;> rfl
α : Type u_1 β : Type u_2 cmp : α → α → Ordering inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α d : β ⊢ Option.getD (if cmp k' k = Ordering.eq then some v else find? t k') d = if cmp k' k = Ordering.eq then v else Option.getD (find? t k') d
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering inst✝ : TransCmp cmp t : RBMap α β cmp k : α v : β k' : α d : β ⊢ Option.getD (if cmp k' k = Ordering.eq then some v else find? t k') d = if cmp k' k = Ordering.eq then v else Option.getD (find? t k') d TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.findD_insert_self
[228, 9]
[229, 52]
simp [findD]
α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp d : β ⊢ findD (insert t k v) k d = v
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp d : β ⊢ findD (insert t k v) k d = v TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/Verification/RBMap.lean
Std.RBMap.findD_insert_of_ne
[231, 1]
[232, 74]
simp [findD_insert, h]
α : Type u_1 β : Type u_2 cmp : α → α → Ordering k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k ≠ Ordering.eq d : β ⊢ findD (insert t k v) k' d = findD t k' d
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 cmp : α → α → Ordering k' k : α v : β inst✝ : TransCmp cmp t : RBMap α β cmp h : cmp k' k ≠ Ordering.eq d : β ⊢ findD (insert t k v) k' d = findD t k' d TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval₀_map
[34, 1]
[37, 21]
dsimp [Stream.eval₀]
ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 q : { q // s.valid q = true } inst✝¹ : Zero α inst✝ : Zero β f : α → β hf : f 0 = 0 ⊢ eval₀ (map f s) q = Finsupp.mapRange f hf (eval₀ s q)
ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 q : { q // s.valid q = true } inst✝¹ : Zero α inst✝ : Zero β f : α → β hf : f 0 = 0 ⊢ (if h₂ : s.ready q = true then fun₀ | s.index q => f (s.value { val := q, property := h₂ }) else 0) = Finsupp.mapRange f hf (if h₂ : s.ready q = true then fun₀ | s.index q => s.value { val := q, property := h₂ } else 0)
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 q : { q // s.valid q = true } inst✝¹ : Zero α inst✝ : Zero β f : α → β hf : f 0 = 0 ⊢ eval₀ (map f s) q = Finsupp.mapRange f hf (eval₀ s q) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval₀_map
[34, 1]
[37, 21]
split_ifs <;> simp
ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 q : { q // s.valid q = true } inst✝¹ : Zero α inst✝ : Zero β f : α → β hf : f 0 = 0 ⊢ (if h₂ : s.ready q = true then fun₀ | s.index q => f (s.value { val := q, property := h₂ }) else 0) = Finsupp.mapRange f hf (if h₂ : s.ready q = true then fun₀ | s.index q => s.value { val := q, property := h₂ } else 0)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 q : { q // s.valid q = true } inst✝¹ : Zero α inst✝ : Zero β f : α → β hf : f 0 = 0 ⊢ (if h₂ : s.ready q = true then fun₀ | s.index q => f (s.value { val := q, property := h₂ }) else 0) = Finsupp.mapRange f hf (if h₂ : s.ready q = true then fun₀ | s.index q => s.value { val := q, property := h₂ } else 0) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.map_zero
[47, 1]
[51, 10]
ext <;> try rfl
ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ map f 0 = 0
case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ HEq (map f 0).value 0.value
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ map f 0 = 0 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.map_zero
[47, 1]
[51, 10]
rw [heq_iff_eq]
case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ HEq (map f 0).value 0.value
case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ (map f 0).value = 0.value
Please generate a tactic in lean4 to solve the state. STATE: case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ HEq (map f 0).value 0.value TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.map_zero
[47, 1]
[51, 10]
funext ⟨q, h⟩
case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ (map f 0).value = 0.value
case value.h ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β q : { x // (map f 0).valid x = true } h : (map f 0).ready q = true ⊢ (map f 0).value { val := q, property := h } = 0.value { val := q, property := h }
Please generate a tactic in lean4 to solve the state. STATE: case value ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ (map f 0).value = 0.value TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.map_zero
[47, 1]
[51, 10]
cases h
case value.h ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β q : { x // (map f 0).valid x = true } h : (map f 0).ready q = true ⊢ (map f 0).value { val := q, property := h } = 0.value { val := q, property := h }
no goals
Please generate a tactic in lean4 to solve the state. STATE: case value.h ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β q : { x // (map f 0).valid x = true } h : (map f 0).ready q = true ⊢ (map f 0).value { val := q, property := h } = 0.value { val := q, property := h } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.map_zero
[47, 1]
[51, 10]
rfl
case ready ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ HEq (map f 0).ready 0.ready
no goals
Please generate a tactic in lean4 to solve the state. STATE: case ready ι : Type α : Type u_2 a b s : Stream ι α β : Type u_1 f : α → β ⊢ HEq (map f 0).ready 0.ready TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.ready'_val
[64, 1]
[65, 34]
simp [Stream.ready', x.prop]
ι : Type α : Type u_1 a b s : Stream ι α x : { q // s.valid q = true } ⊢ ready' s ↑x ↔ s.ready x = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α x : { q // s.valid q = true } ⊢ ready' s ↑x ↔ s.ready x = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.coeLex_le_iff
[91, 1]
[92, 26]
simp [Prod.Lex.le_iff']
ι : Type α : Type ?u.4823 a b s : Stream ι α inst✝ : Preorder ι x y : StreamOrder ι ⊢ coeLex x ≤ coeLex y ↔ x ≤ y
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type ?u.4823 a b s : Stream ι α inst✝ : Preorder ι x y : StreamOrder ι ⊢ coeLex x ≤ coeLex y ↔ x ≤ y TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.coeLex_lt_iff
[95, 1]
[96, 26]
simp [Prod.Lex.lt_iff']
ι : Type α : Type ?u.6775 a b s : Stream ι α inst✝ : Preorder ι x y : StreamOrder ι ⊢ coeLex x < coeLex y ↔ x < y
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type ?u.6775 a b s : Stream ι α inst✝ : Preorder ι x y : StreamOrder ι ⊢ coeLex x < coeLex y ↔ x < y TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.coeLex_injective
[98, 1]
[101, 9]
rw [Prod.mk.injEq .., Prod.mk.injEq ..]
ι : Type α : Type ?u.7590 a b s : Stream ι α x₁ : ι y₁ : Bool x₂ : ι y₂ : Bool ⊢ coeLex (x₁, y₁) = coeLex (x₂, y₂) → (x₁, y₁) = (x₂, y₂)
ι : Type α : Type ?u.7590 a b s : Stream ι α x₁ : ι y₁ : Bool x₂ : ι y₂ : Bool ⊢ ↑(x₁, y₁).1 = ↑(x₂, y₂).1 ∧ (x₁, y₁).2 = (x₂, y₂).2 → x₁ = x₂ ∧ y₁ = y₂
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type ?u.7590 a b s : Stream ι α x₁ : ι y₁ : Bool x₂ : ι y₂ : Bool ⊢ coeLex (x₁, y₁) = coeLex (x₂, y₂) → (x₁, y₁) = (x₂, y₂) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.coeLex_injective
[98, 1]
[101, 9]
simp
ι : Type α : Type ?u.7590 a b s : Stream ι α x₁ : ι y₁ : Bool x₂ : ι y₂ : Bool ⊢ ↑(x₁, y₁).1 = ↑(x₂, y₂).1 ∧ (x₁, y₁).2 = (x₂, y₂).2 → x₁ = x₂ ∧ y₁ = y₂
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type ?u.7590 a b s : Stream ι α x₁ : ι y₁ : Bool x₂ : ι y₂ : Bool ⊢ ↑(x₁, y₁).1 = ↑(x₂, y₂).1 ∧ (x₁, y₁).2 = (x₂, y₂).2 → x₁ = x₂ ∧ y₁ = y₂ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.index'_invalid
[118, 1]
[119, 21]
simpa
ι : Type α : Type u_1 a b s : Stream ι α x : s.σ h : s.valid x = false ⊢ ¬s.valid x = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α x : s.σ h : s.valid x = false ⊢ ¬s.valid x = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.toOrder'_val
[152, 1]
[153, 72]
simp [Stream.toOrder']
ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ toOrder' s ↑q = (index' s ↑q, s.ready q)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ toOrder' s ↑q = (index' s ↑q, s.ready q) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.coeLex_toOrder
[155, 1]
[157, 37]
simp [coeLex, Stream.toOrder'_val]
ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ toOrder' s ↑q = coeLex (toOrder s q)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ toOrder' s ↑q = coeLex (toOrder s q) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.toOrder'_val_snd
[160, 1]
[161, 66]
simp [Stream.toOrder'_val]
ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ (toOrder' s ↑q).2 = s.ready q
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α q : { q // s.valid q = true } ⊢ (toOrder' s ↑q).2 = s.ready q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.index'_lt_top_iff
[165, 1]
[170, 13]
rw [Stream.index']
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ ⊢ index' s q < ⊤ ↔ s.valid q = true
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ ⊢ (if h : s.valid q = true then ↑(s.index { val := q, property := h }) else ⊤) < ⊤ ↔ s.valid q = true
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ ⊢ index' s q < ⊤ ↔ s.valid q = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.index'_lt_top_iff
[165, 1]
[170, 13]
split_ifs
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ ⊢ (if h : s.valid q = true then ↑(s.index { val := q, property := h }) else ⊤) < ⊤ ↔ s.valid q = true
case pos ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : s.valid q = true ⊢ ↑(s.index { val := q, property := h✝ }) < ⊤ ↔ s.valid q = true case neg ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : ¬s.valid q = true ⊢ ⊤ < ⊤ ↔ s.valid q = true
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ ⊢ (if h : s.valid q = true then ↑(s.index { val := q, property := h }) else ⊤) < ⊤ ↔ s.valid q = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.index'_lt_top_iff
[165, 1]
[170, 13]
simpa [WithTop.coe_lt_top]
case pos ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : s.valid q = true ⊢ ↑(s.index { val := q, property := h✝ }) < ⊤ ↔ s.valid q = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : s.valid q = true ⊢ ↑(s.index { val := q, property := h✝ }) < ⊤ ↔ s.valid q = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.index'_lt_top_iff
[165, 1]
[170, 13]
simp [*]
case neg ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : ¬s.valid q = true ⊢ ⊤ < ⊤ ↔ s.valid q = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι q : s.σ h✝ : ¬s.valid q = true ⊢ ⊤ < ⊤ ↔ s.valid q = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.get_index'
[173, 1]
[176, 42]
simpa using h
ι : Type α : Type ?u.13400 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true ⊢ s.valid x = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type ?u.13400 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true ⊢ s.valid x = true TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.get_index'
[173, 1]
[176, 42]
generalize_proofs hq
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true ⊢ Option.get (index' s x) h = s.index { val := x, property := ⋯ }
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true hq : s.valid x = true ⊢ Option.get (index' s x) h = s.index { val := x, property := hq }
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true ⊢ Option.get (index' s x) h = s.index { val := x, property := ⋯ } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.get_index'
[173, 1]
[176, 42]
simp_rw [Stream.index', hq, Option.get]
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true hq : s.valid x = true ⊢ Option.get (index' s x) h = s.index { val := x, property := hq }
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : PartialOrder ι x : s.σ h : Option.isSome (index' s x) = true hq : s.valid x = true ⊢ Option.get (index' s x) h = s.index { val := x, property := hq } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.wf_valid_iff
[219, 1]
[222, 79]
simp only [Stream.seek'_val q.prop, Stream.coeLex_toOrder, coeLex_lt_iff]
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι wf_rel : s.σ → s.σ → Prop q : { x // s.valid x = true } i : Lex (ι × Bool) ⊢ wf_rel (s.seek q i) ↑q ∨ i < Stream.toOrder s q ∧ s.seek q i = ↑q ↔ wf_rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι wf_rel : s.σ → s.σ → Prop q : { x // s.valid x = true } i : Lex (ι × Bool) ⊢ wf_rel (s.seek q i) ↑q ∨ i < Stream.toOrder s q ∧ s.seek q i = ↑q ↔ wf_rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.IsBounded.mk'
[225, 1]
[233, 36]
simp only [wf_valid_iff]
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι h : ∃ wf_rel, ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (s.seek q i) ↑q ∨ i < Stream.toOrder s q ∧ s.seek q i = ↑q
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι h : ∃ wf_rel, ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι h : ∃ wf_rel, ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (s.seek q i) ↑q ∨ i < Stream.toOrder s q ∧ s.seek q i = ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.IsBounded.mk'
[225, 1]
[233, 36]
rcases h with ⟨wfr, hr⟩
ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι h : ∃ wf_rel, ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q
case intro ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι wfr : WellFoundedRelation s.σ hr : ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι h : ∃ wf_rel, ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.IsBounded.mk'
[225, 1]
[233, 36]
exact ⟨wfr, fun q i => hr q i⟩
case intro ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι wfr : WellFoundedRelation s.σ hr : ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro ι : Type α : Type u_1 a b s : Stream ι α inst✝ : Preorder ι wfr : WellFoundedRelation s.σ hr : ∀ (q : s.σ) (i : StreamOrder ι), WellFoundedRelation.rel (Stream.seek' s q i) q ∨ coeLex i < Stream.toOrder' s q ∧ Stream.seek' s q i = q ⊢ ∃ wf_rel, ∀ (q : { x // s.valid x = true }) (i : Lex (ι × Bool)), WellFoundedRelation.rel (Stream.seek' s (↑q) i) ↑q ∨ coeLex i < Stream.toOrder' s ↑q ∧ Stream.seek' s (↑q) i = ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
rw [← wf_valid_iff (q := ⟨q, hq⟩)]
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : s.valid q = true ⊢ WfRel s (seek' s q i) q ∨ coeLex i < toOrder' s q ∧ seek' s q i = q
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : s.valid q = true ⊢ WfRel s (s.seek { val := q, property := hq } i) ↑{ val := q, property := hq } ∨ i < toOrder s { val := q, property := hq } ∧ s.seek { val := q, property := hq } i = ↑{ val := q, property := hq }
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : s.valid q = true ⊢ WfRel s (seek' s q i) q ∨ coeLex i < toOrder' s q ∧ seek' s q i = q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
exact s.wf_valid ⟨q, hq⟩ i
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : s.valid q = true ⊢ WfRel s (s.seek { val := q, property := hq } i) ↑{ val := q, property := hq } ∨ i < toOrder s { val := q, property := hq } ∧ s.seek { val := q, property := hq } i = ↑{ val := q, property := hq }
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : s.valid q = true ⊢ WfRel s (s.seek { val := q, property := hq } i) ↑{ val := q, property := hq } ∨ i < toOrder s { val := q, property := hq } ∧ s.seek { val := q, property := hq } i = ↑{ val := q, property := hq } TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
right
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ WfRel s (seek' s q i) q ∨ coeLex i < toOrder' s q ∧ seek' s q i = q
case h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q ∧ seek' s q i = q
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ WfRel s (seek' s q i) q ∨ coeLex i < toOrder' s q ∧ seek' s q i = q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
constructor
case h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q ∧ seek' s q i = q
case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q case h.right ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ seek' s q i = q
Please generate a tactic in lean4 to solve the state. STATE: case h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q ∧ seek' s q i = q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
rw [Prod.Lex.lt_iff']
case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q
case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1 ∨ (coeLex i).1 = (toOrder' s q).1 ∧ (coeLex i).2 < (toOrder' s q).2
Please generate a tactic in lean4 to solve the state. STATE: case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ coeLex i < toOrder' s q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
left
case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1 ∨ (coeLex i).1 = (toOrder' s q).1 ∧ (coeLex i).2 < (toOrder' s q).2
case h.left.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1
Please generate a tactic in lean4 to solve the state. STATE: case h.left ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1 ∨ (coeLex i).1 = (toOrder' s q).1 ∧ (coeLex i).2 < (toOrder' s q).2 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
simp [hq]
case h.left.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.left.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ (coeLex i).1 < (toOrder' s q).1 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.wf_valid'
[236, 1]
[247, 16]
simp [hq]
case h.right ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ seek' s q i = q
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.right ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : s.σ i : StreamOrder ι hq : ¬s.valid q = true ⊢ seek' s q i = q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.next_wf
[253, 1]
[255, 26]
rw [Stream.advance_val]
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ WfRel s (advance s ↑q) ↑q
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ WfRel s (s.seek q (toOrder s q)) ↑q
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ WfRel s (advance s ↑q) ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.next_wf
[253, 1]
[255, 26]
exact s.progress rfl.le
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ WfRel s (s.seek q (toOrder s q)) ↑q
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ WfRel s (s.seek q (toOrder s q)) ↑q TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_zero
[275, 1]
[276, 30]
ext
ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α ⊢ eval 0 = 0
case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (eval 0 x✝) a✝ = (0 x✝) a✝
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α ⊢ eval 0 = 0 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_zero
[275, 1]
[276, 30]
rw [Stream.eval]
case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (eval 0 x✝) a✝ = (0 x✝) a✝
case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (if h : 0.valid x✝ = true then let_fun this := ⋯; eval₀ 0 { val := x✝, property := h } + eval 0 (advance 0 x✝) else 0) a✝ = (0 x✝) a✝
Please generate a tactic in lean4 to solve the state. STATE: case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (eval 0 x✝) a✝ = (0 x✝) a✝ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_zero
[275, 1]
[276, 30]
simp
case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (if h : 0.valid x✝ = true then let_fun this := ⋯; eval₀ 0 { val := x✝, property := h } + eval 0 (advance 0 x✝) else 0) a✝ = (0 x✝) a✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.h ι : Type α : Type u_1 a b s : Stream ι α inst✝¹ : Preorder ι inst✝ : AddZeroClass α x✝ : 0.σ a✝ : ι ⊢ (if h : 0.valid x✝ = true then let_fun this := ⋯; eval₀ 0 { val := x✝, property := h } + eval 0 (advance 0 x✝) else 0) a✝ = (0 x✝) a✝ TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_invalid
[279, 1]
[281, 67]
rwa [Stream.eval, dif_neg]
ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s q : s.σ h : ¬s.valid q = true ⊢ eval s q = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s q : s.σ h : ¬s.valid q = true ⊢ eval s q = 0 TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_valid
[284, 1]
[286, 78]
rw [Stream.eval, dif_pos]
ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ eval s ↑q = eval₀ s q + eval s (advance s ↑q)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s q : { q // s.valid q = true } ⊢ eval s ↑q = eval₀ s q + eval s (advance s ↑q) TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_map_id
[289, 1]
[290, 47]
subst f
ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α f : α → α hf : f = id s : Stream ι α inst✝ : IsBounded s ⊢ eval (map f s) = eval s
ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s ⊢ eval (map id s) = eval s
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α f : α → α hf : f = id s : Stream ι α inst✝ : IsBounded s ⊢ eval (map f s) = eval s TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_map_id
[289, 1]
[290, 47]
rfl
ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s ⊢ eval (map id s) = eval s
no goals
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_1 a b s✝ : Stream ι α inst✝² : Preorder ι inst✝¹ : AddZeroClass α s : Stream ι α inst✝ : IsBounded s ⊢ eval (map id s) = eval s TACTIC:
https://github.com/kovach/etch.git
b9e66fe99c33dc1edd926626e598ba00d5d78627
Etch/StreamFusion/Proofs/StreamProof.lean
Etch.Verification.Stream.eval_map
[292, 1]
[302, 49]
apply s.wf.induction q
ι : Type α : Type u_2 a b s✝ : Stream ι α inst✝³ : Preorder ι β : Type u_1 inst✝² : AddCommMonoid α inst✝¹ : AddCommMonoid β f : α →+ β s : Stream ι α inst✝ : IsBounded s q : s.σ ⊢ eval (map (⇑f) s) q = (Finsupp.mapRange.addMonoidHom f) (eval s q)
ι : Type α : Type u_2 a b s✝ : Stream ι α inst✝³ : Preorder ι β : Type u_1 inst✝² : AddCommMonoid α inst✝¹ : AddCommMonoid β f : α →+ β s : Stream ι α inst✝ : IsBounded s q : s.σ ⊢ ∀ (x : s.σ), (∀ (y : s.σ), WfRel s y x → eval (map (⇑f) s) y = (Finsupp.mapRange.addMonoidHom f) (eval s y)) → eval (map (⇑f) s) x = (Finsupp.mapRange.addMonoidHom f) (eval s x)
Please generate a tactic in lean4 to solve the state. STATE: ι : Type α : Type u_2 a b s✝ : Stream ι α inst✝³ : Preorder ι β : Type u_1 inst✝² : AddCommMonoid α inst✝¹ : AddCommMonoid β f : α →+ β s : Stream ι α inst✝ : IsBounded s q : s.σ ⊢ eval (map (⇑f) s) q = (Finsupp.mapRange.addMonoidHom f) (eval s q) TACTIC: