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/Imap.lean | Etch.Verification.Stream.IsMonotonic.imap | [40, 1] | [46, 39] | rw [Stream.isMonotonic_iff] | ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
⊢ IsMonotonic (imap_general f g s) | ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : Lex (ι' × Bool))
(hq : (imap_general f g s).valid ((imap_general f g s).seek q i) = true),
(imap_general f g s).index q ≤ (imap_general f g s).index { val := (imap_general f g s).seek q i, property := hq } | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
⊢ IsMonotonic (imap_general f g s)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsMonotonic.imap | [40, 1] | [46, 39] | rintro q ⟨i, b⟩ hq | ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : Lex (ι' × Bool))
(hq : (imap_general f g s).valid ((imap_general f g s).seek q i) = true),
(imap_general f g s).index q ≤ (imap_general f g s).index { val := (imap_general f g s).seek q i, property := hq } | case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // (imap_general f g s).valid x = true }
i : ι'
b : Bool
hq : (imap_general f g s).valid ((imap_general f g s).seek q (i, b)) = true
⊢ (imap_general f g s).index q ≤
(imap_general f g s).index { val := (imap_general f g s).seek q (i, b), property := hq } | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : Lex (ι' × Bool))
(hq : (imap_general f g s).valid ((imap_general f g s).seek q i) = true),
(imap_general f g s).index q ≤ (imap_general f g s).index { val := (imap_general f g s).seek q i, property := hq }
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsMonotonic.imap | [40, 1] | [46, 39] | dsimp at q hq ⊢ | case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // (imap_general f g s).valid x = true }
i : ι'
b : Bool
hq : (imap_general f g s).valid ((imap_general f g s).seek q (i, b)) = true
⊢ (imap_general f g s).index q ≤
(imap_general f g s).index { val := (imap_general f g s).seek q (i, b), property := hq } | case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ f (s.index q) ≤ f (s.index { val := s.seek q (g (s.index q) i, b), property := hq }) | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // (imap_general f g s).valid x = true }
i : ι'
b : Bool
hq : (imap_general f g s).valid ((imap_general f g s).seek q (i, b)) = true
⊢ (imap_general f g s).index q ≤
(imap_general f g s).index { val := (imap_general f g s).seek q (i, b), property := hq }
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsMonotonic.imap | [40, 1] | [46, 39] | apply hf | case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ f (s.index q) ≤ f (s.index { val := s.seek q (g (s.index q) i, b), property := hq }) | case mk.a
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ s.index q ≤ s.index { val := s.seek q (g (s.index q) i, b), property := hq } | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ f (s.index q) ≤ f (s.index { val := s.seek q (g (s.index q) i, b), property := hq })
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsMonotonic.imap | [40, 1] | [46, 39] | apply Stream.isMonotonic_iff.mp hs q | case mk.a
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ s.index q ≤ s.index { val := s.seek q (g (s.index q) i, b), property := hq } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case mk.a
ι ι' : Type
inst✝¹ : LinearOrder ι
inst✝ : LinearOrder ι'
α : Type u_1
s : Stream ι α
hs : IsMonotonic s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
q : { x // s.valid x = true }
i : ι'
b : Bool
hq : s.valid (s.seek q (g (s.index q) i, b)) = true
⊢ s.index q ≤ s.index { val := s.seek q (g (s.index q) i, b), property := hq }
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | haveI : IsBounded (s.imap_general f g) := IsBounded.imap s f g hfg | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
⊢ IsLawful (imap_general f g s) | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ IsLawful (imap_general f g s) | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
⊢ IsLawful (imap_general f g s)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | refine ⟨s.mono.imap g hf, ?_⟩ | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ IsLawful (imap_general f g s) | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : StreamOrder ι') (j : ι'),
i ≤ (j, false) →
(evalMultiset (imap_general f g s) ((imap_general f g s).seek q i)) j = (evalMultiset (imap_general f g s) ↑q) j | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ IsLawful (imap_general f g s)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | rintro q ⟨j₁, b⟩ j₂ hj | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : StreamOrder ι') (j : ι'),
i ≤ (j, false) →
(evalMultiset (imap_general f g s) ((imap_general f g s).seek q i)) j = (evalMultiset (imap_general f g s) ↑q) j | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) ((imap_general f g s).seek q (j₁, b))) j₂ =
(evalMultiset (imap_general f g s) ↑q) j₂ | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
⊢ ∀ (q : { x // (imap_general f g s).valid x = true }) (i : StreamOrder ι') (j : ι'),
i ≤ (j, false) →
(evalMultiset (imap_general f g s) ((imap_general f g s).seek q i)) j = (evalMultiset (imap_general f g s) ↑q) j
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | dsimp only [imap_general_seek, imap_general_σ, imap_general_valid] | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) ((imap_general f g s).seek q (j₁, b))) j₂ =
(evalMultiset (imap_general f g s) ↑q) j₂ | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂ | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) ((imap_general f g s).seek q (j₁, b))) j₂ =
(evalMultiset (imap_general f g s) ↑q) j₂
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | dsimp at q | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂ | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂ | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // (imap_general f g s).valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | suffices ∀ i, f i = j₂ → s.eval (s.seek q (g (s.index q) j₁, b)) i = s.eval q i by sorry | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂ | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ ∀ (i : ι), f i = j₂ → (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | rintro i rfl | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ ∀ (i : ι), f i = j₂ → (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
⊢ ∀ (i : ι), f i = j₂ → (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | by_cases le : s.index q ≤ i | case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | case pos
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : s.index q ≤ i
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
case neg
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | Please generate a tactic in lean4 to solve the state.
STATE:
case mk
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | sorry | ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this✝ : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
this : ∀ (i : ι), f i = j₂ → (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this✝ : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
j₂ : ι'
hj : (j₁, b) ≤ (j₂, false)
this : ∀ (i : ι), f i = j₂ → (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
⊢ (evalMultiset (imap_general f g s) (s.seek q (g (s.index q) j₁, b))) j₂ = (evalMultiset (imap_general f g s) ↑q) j₂
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | rw [s.mono.eq_zero_of_lt_index, s.mono.eq_zero_of_lt_index] | case neg
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i | case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s ↑q
case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s (s.seek q (g (s.index q) j₁, b)) | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ (eval s (s.seek q (g (s.index q) j₁, b))) i = (eval s ↑q) i
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | simpa using le | case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s ↑q | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s ↑q
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/Imap.lean | Etch.Verification.Stream.IsLawful.imap | [48, 1] | [68, 21] | refine lt_of_lt_of_le ?_ (s.mono q _) | case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s (s.seek q (g (s.index q) j₁, b)) | case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s ↑q | Please generate a tactic in lean4 to solve the state.
STATE:
case neg.a
ι ι' : Type
inst✝³ : LinearOrder ι
inst✝² : LinearOrder ι'
α : Type u_1
s : Stream ι α
inst✝¹ : AddZeroClass α
inst✝ : IsLawful s
f : ι → ι'
g : ι → ι' → ι
hf : Monotone f
hg : ∀ (j : ι'), Monotone fun x => g x j
hfg : ∀ (i : ι) (j : ι'), compareOfLessAndEq j (f i) = compareOfLessAndEq (g i j) i
this : IsBounded (imap_general f g s)
q : { x // s.valid x = true }
j₁ : ι'
b : Bool
i : ι
hj : (j₁, b) ≤ (f i, false)
le : ¬s.index q ≤ i
⊢ ↑i < index' s (s.seek q (g (s.index q) j₁, b))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.mul.ready.order_eq | [26, 1] | [29, 8] | dsimp only [Stream.toOrder] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // valid a b p = true }
h : ready a b q = true
⊢ toOrder a (valid.fst q) = toOrder b (valid.snd q) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // valid a b p = true }
h : ready a b q = true
⊢ (a.index (valid.fst q), a.ready (valid.fst q)) = (b.index (valid.snd q), b.ready (valid.snd q)) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // valid a b p = true }
h : ready a b q = true
⊢ toOrder a (valid.fst q) = toOrder b (valid.snd q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.mul.ready.order_eq | [26, 1] | [29, 8] | aesop | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // valid a b p = true }
h : ready a b q = true
⊢ (a.index (valid.fst q), a.ready (valid.fst q)) = (b.index (valid.snd q), b.ready (valid.snd q)) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // valid a b p = true }
h : ready a b q = true
⊢ (a.index (valid.fst q), a.ready (valid.fst q)) = (b.index (valid.snd q), b.ready (valid.snd q))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.order_eq_of_zip_ready | [31, 1] | [35, 8] | dsimp only [Stream.toOrder] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
h : mul.ready a b q = true
⊢ toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
h : mul.ready a b q = true
⊢ (a.index (mul.valid.fst q), a.ready (mul.valid.fst q)) = ((zip a b).index q, (zip a b).ready q) ∧
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q)) = ((zip a b).index q, (zip a b).ready q) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
h : mul.ready a b q = true
⊢ toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.order_eq_of_zip_ready | [31, 1] | [35, 8] | aesop | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
h : mul.ready a b q = true
⊢ (a.index (mul.valid.fst q), a.ready (mul.valid.fst q)) = ((zip a b).index q, (zip a b).ready q) ∧
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q)) = ((zip a b).index q, (zip a b).ready q) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
h : mul.ready a b q = true
⊢ (a.index (mul.valid.fst q), a.ready (mul.valid.fst q)) = ((zip a b).index q, (zip a b).ready q) ∧
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q)) = ((zip a b).index q, (zip a b).ready q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | rw [Stream.index'] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
⊢ index' (zip a b) q = max (index' a q.1) (index' b q.2) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
⊢ (if h : (zip a b).valid q = true then ↑((zip a b).index { val := q, property := h }) else ⊤) =
max (index' a q.1) (index' b q.2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
⊢ index' (zip a b) q = max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | split_ifs with h | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
⊢ (if h : (zip a b).valid q = true then ↑((zip a b).index { val := q, property := h }) else ⊤) =
max (index' a q.1) (index' b q.2) | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : (zip a b).valid q = true
⊢ ↑((zip a b).index { val := q, property := h }) = max (index' a q.1) (index' b q.2)
case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : ¬(zip a b).valid q = true
⊢ ⊤ = max (index' a q.1) (index' b q.2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
⊢ (if h : (zip a b).valid q = true then ↑((zip a b).index { val := q, property := h }) else ⊤) =
max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | simp at h | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : (zip a b).valid q = true
⊢ ↑((zip a b).index { val := q, property := h }) = max (index' a q.1) (index' b q.2) | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ ↑((zip a b).index { val := q, property := h✝ }) = max (index' a q.1) (index' b q.2) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : (zip a b).valid q = true
⊢ ↑((zip a b).index { val := q, property := h }) = max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | simp [index'_val' _ h.1, index'_val' _ h.2] | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ ↑((zip a b).index { val := q, property := h✝ }) = max (index' a q.1) (index' b q.2) | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ max ↑(a.index (mul.valid.fst { val := q, property := h✝ })) ↑(b.index (mul.valid.snd { val := q, property := h✝ })) =
max ↑(a.index { val := q.1, property := ⋯ }) ↑(b.index { val := q.2, property := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ ↑((zip a b).index { val := q, property := h✝ }) = max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | rfl | case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ max ↑(a.index (mul.valid.fst { val := q, property := h✝ })) ↑(b.index (mul.valid.snd { val := q, property := h✝ })) =
max ↑(a.index { val := q.1, property := ⋯ }) ↑(b.index { val := q.2, property := ⋯ }) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case pos
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h✝ : (zip a b).valid q = true
h : a.valid q.1 = true ∧ b.valid q.2 = true
⊢ max ↑(a.index (mul.valid.fst { val := q, property := h✝ })) ↑(b.index (mul.valid.snd { val := q, property := h✝ })) =
max ↑(a.index { val := q.1, property := ⋯ }) ↑(b.index { val := q.2, property := ⋯ })
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | simp [-not_and, not_and_or] at h | case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : ¬(zip a b).valid q = true
⊢ ⊤ = max (index' a q.1) (index' b q.2) | case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ ⊤ = max (index' a q.1) (index' b q.2) | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : ¬(zip a b).valid q = true
⊢ ⊤ = max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_index' | [37, 1] | [44, 32] | rcases h with h | h
<;> simp [index'_invalid h] | case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ ⊤ = max (index' a q.1) (index' b q.2) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : (zip a b).σ
h : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ ⊤ = max (index' a q.1) (index' b q.2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | rw [Prod.Lex.le_iff''] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q)) ≤ toOrder (zip a b) q | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ (min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ≤ (toOrder (zip a b) q).1 ∧
((min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q)) ≤ toOrder (zip a b) q
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | simp only [Monotone.map_min (@Prod.Lex.fst_mono ι Bool _ _)] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ (min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ≤ (toOrder (zip a b) q).1 ∧
((min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1 ∧
(min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ (min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ≤ (toOrder (zip a b) q).1 ∧
((min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | constructor | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1 ∧
(min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2) | case left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1
case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1 ∧
(min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | exact min_le_max | case left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 ≤ (toOrder (zip a b) q).1
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | simp only [toOrder] | case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2 | case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (a.index (mul.valid.fst q)) (b.index (mul.valid.snd q)) = (zip a b).index q →
(min (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 ≤
(zip a b).ready q | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (toOrder a (mul.valid.fst q)).1 (toOrder b (mul.valid.snd q)).1 = (toOrder (zip a b) q).1 →
(min (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 ≤ (toOrder (zip a b) q).2
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.min_toOrder_le | [46, 1] | [53, 10] | aesop | case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (a.index (mul.valid.fst q)) (b.index (mul.valid.snd q)) = (zip a b).index q →
(min (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 ≤
(zip a b).ready q | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { p // mul.valid a b p = true }
⊢ min (a.index (mul.valid.fst q)) (b.index (mul.valid.snd q)) = (zip a b).index q →
(min (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 ≤
(zip a b).ready q
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | rw [Prod.Lex.le_iff'] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ toOrder (zip a b) q ≤ max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q)) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 < (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∨
(toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ toOrder (zip a b) q ≤ max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | right | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 < (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∨
(toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | case h
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 < (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∨
(toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | constructor | case h
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | case h.left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1
case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | Please generate a tactic in lean4 to solve the state.
STATE:
case h
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 ∧
(toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | simp [Monotone.map_max (@Prod.Lex.fst_mono ι Bool _ _)] | case h.left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.left
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).1 = (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).1
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | simp only [Bool.le_iff_imp, toOrder] | case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2 | case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (zip a b).ready q = true →
(max (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 =
true | Please generate a tactic in lean4 to solve the state.
STATE:
case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (toOrder (zip a b) q).2 ≤ (max (toOrder a (mul.valid.fst q)) (toOrder b (mul.valid.snd q))).2
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.toOrder_le_max | [55, 1] | [60, 10] | aesop | case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (zip a b).ready q = true →
(max (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 =
true | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.right
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
q : { q // (zip a b).valid q = true }
⊢ (zip a b).ready q = true →
(max (a.index (mul.valid.fst q), a.ready (mul.valid.fst q))
(b.index (mul.valid.snd q), b.ready (mul.valid.snd q))).2 =
true
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_mono | [75, 1] | [79, 37] | intro q i | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
⊢ IsMonotonic (zip a b) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ index' (zip a b) ↑q ≤ index' (zip a b) ((zip a b).seek q i) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
⊢ IsMonotonic (zip a b)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_mono | [75, 1] | [79, 37] | simp only [zip_index'] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ index' (zip a b) ↑q ≤ index' (zip a b) ((zip a b).seek q i) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ max (index' a (↑q).1) (index' b (↑q).2) ≤ max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ index' (zip a b) ↑q ≤ index' (zip a b) ((zip a b).seek q i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_mono | [75, 1] | [79, 37] | exact max_le_max (ha _ _) (hb _ _) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ max (index' a (↑q).1) (index' b (↑q).2) ≤ max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsMonotonic a
hb : IsMonotonic b
q : { q // (zip a b).valid q = true }
i : Lex (ι × Bool)
⊢ max (index' a (↑q).1) (index' b (↑q).2) ≤ max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_strict_mono | [81, 1] | [90, 22] | simp only [zip_index'] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
⊢ index' (zip a b) ↑q < index' (zip a b) ((zip a b).seek q i) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
⊢ index' (zip a b) ↑q < index' (zip a b) ((zip a b).seek q i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_strict_mono | [81, 1] | [90, 22] | have := order_eq_of_zip_ready hr | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_strict_mono | [81, 1] | [90, 22] | simp at hr | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
hr :
(a.ready (mul.valid.fst q) = true ∧ b.ready (mul.valid.snd q) = true) ∧
a.index (mul.valid.fst q) = b.index (mul.valid.snd q)
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
hr : (zip a b).ready q = true
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_strict_mono | [81, 1] | [90, 22] | apply max_lt_max (ha.lt (hr := hr.1.1) ..) (hb.lt (hr := hr.1.2) ..) <;>
simpa [this] | ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
hr :
(a.ready (mul.valid.fst q) = true ∧ b.ready (mul.valid.snd q) = true) ∧
a.index (mul.valid.fst q) = b.index (mul.valid.snd q)
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝ : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
ha : IsStrictMono a
hb : IsStrictMono b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
H : toOrder (zip a b) q ≤ i
this : toOrder a (mul.valid.fst q) = toOrder (zip a b) q ∧ toOrder b (mul.valid.snd q) = toOrder (zip a b) q
hr :
(a.ready (mul.valid.fst q) = true ∧ b.ready (mul.valid.snd q) = true) ∧
a.index (mul.valid.fst q) = b.index (mul.valid.snd q)
⊢ max (index' a (↑q).1) (index' b (↑q).2) < max (index' a ((zip a b).seek q i).1) (index' b ((zip a b).seek q i).2)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_eq_zero_of_lt_toOrder | [115, 1] | [118, 50] | have := (zip_strict_mono a.strictMono b.strictMono).1.eq_empty_of_lt_index (q := q) i (by rwa [index'_val, WithTop.coe_lt_coe]) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ evalOption (zip a b) (↑q) i = none | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
this : (evalMultiset (zip a b) ↑q) i = 0
⊢ evalOption (zip a b) (↑q) i = none | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ evalOption (zip a b) (↑q) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_eq_zero_of_lt_toOrder | [115, 1] | [118, 50] | rw [Stream.evalOption, this, Multiset.get_zero] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
this : (evalMultiset (zip a b) ↑q) i = 0
⊢ evalOption (zip a b) (↑q) i = none | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
this : (evalMultiset (zip a b) ↑q) i = 0
⊢ evalOption (zip a b) (↑q) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_eq_zero_of_lt_toOrder | [115, 1] | [118, 50] | rwa [index'_val, WithTop.coe_lt_coe] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ ↑i < index' (zip a b) ↑q | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ ↑i < index' (zip a b) ↑q
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | simp only [zip_index, lt_max_iff] at hi | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ evalOption a (↑(mul.valid.fst q)) i = none ∨ evalOption b (↑(mul.valid.snd q)) i = none | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none ∨ evalOption b (↑(mul.valid.snd q)) i = none | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < (zip a b).index q
⊢ evalOption a (↑(mul.valid.fst q)) i = none ∨ evalOption b (↑(mul.valid.snd q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | refine hi.imp ?_ ?_ <;> intro hi | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none ∨ evalOption b (↑(mul.valid.snd q)) i = none | case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none
case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) i = none | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none ∨ evalOption b (↑(mul.valid.snd q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | have := a.mono.eq_empty_of_lt_index (q := mul.valid.fst q) i (by rwa [index'_val, WithTop.coe_lt_coe]) | case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none | case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
this : (evalMultiset a ↑(mul.valid.fst q)) i = 0
⊢ evalOption a (↑(mul.valid.fst q)) i = none | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | rw [Stream.evalOption, this, Multiset.get_zero] | case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
this : (evalMultiset a ↑(mul.valid.fst q)) i = 0
⊢ evalOption a (↑(mul.valid.fst q)) i = none | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_1
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
this : (evalMultiset a ↑(mul.valid.fst q)) i = 0
⊢ evalOption a (↑(mul.valid.fst q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | rwa [index'_val, WithTop.coe_lt_coe] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
⊢ ↑i < index' a ↑(mul.valid.fst q) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < a.index (mul.valid.fst q)
⊢ ↑i < index' a ↑(mul.valid.fst q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | have := b.mono.eq_empty_of_lt_index (q := mul.valid.snd q) i (by rwa [index'_val, WithTop.coe_lt_coe]) | case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) i = none | case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
this : (evalMultiset b ↑(mul.valid.snd q)) i = 0
⊢ evalOption b (↑(mul.valid.snd q)) i = none | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | rw [Stream.evalOption, this, Multiset.get_zero] | case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
this : (evalMultiset b ↑(mul.valid.snd q)) i = 0
⊢ evalOption b (↑(mul.valid.snd q)) i = none | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
this : (evalMultiset b ↑(mul.valid.snd q)) i = 0
⊢ evalOption b (↑(mul.valid.snd q)) i = none
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_left_or_right_eq_zero_of_lt_toOrder | [120, 1] | [127, 52] | rwa [index'_val, WithTop.coe_lt_coe] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
⊢ ↑i < index' b ↑(mul.valid.snd q) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { x // (zip a b).valid x = true }
hi✝ : i < a.index (mul.valid.fst q) ∨ i < b.index (mul.valid.snd q)
hi : i < b.index (mul.valid.snd q)
⊢ ↑i < index' b ↑(mul.valid.snd q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq | [129, 1] | [132, 6] | rw [(zip_strict_mono a.strictMono b.strictMono).evalOption_ready h] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ evalOption (zip a b) (↑q) ((zip a b).index q) =
some (a.value (mul.ready.fst { val := q, property := h }), b.value (mul.ready.snd { val := q, property := h })) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ some ((zip a b).value { val := q, property := h }) =
some (a.value (mul.ready.fst { val := q, property := h }), b.value (mul.ready.snd { val := q, property := h })) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ evalOption (zip a b) (↑q) ((zip a b).index q) =
some (a.value (mul.ready.fst { val := q, property := h }), b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq | [129, 1] | [132, 6] | rfl | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ some ((zip a b).value { val := q, property := h }) =
some (a.value (mul.ready.fst { val := q, property := h }), b.value (mul.ready.snd { val := q, property := h })) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ some ((zip a b).value { val := q, property := h }) =
some (a.value (mul.ready.fst { val := q, property := h }), b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | have Ha : (a.zip b).index q = (a.index <| mul.valid.fst q) := by aesop | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | have Hb : (a.zip b).index q = (b.index <| mul.valid.snd q) := by aesop | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | constructor | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h }))
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) ∧
evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | aesop | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ (zip a b).index q = a.index (mul.valid.fst q) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
⊢ (zip a b).index q = a.index (mul.valid.fst q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | aesop | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
⊢ (zip a b).index q = b.index (mul.valid.snd q) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
⊢ (zip a b).index q = b.index (mul.valid.snd q)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | rw [Ha, a.strictMono.evalOption_ready] | case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h })) | case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (a.value { val := mul.valid.fst q, property := ?left }) =
some (a.value (mul.ready.fst { val := q, property := h }))
case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ a.ready (mul.valid.fst q) = true | Please generate a tactic in lean4 to solve the state.
STATE:
case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption a (↑(mul.valid.fst q)) ((zip a b).index q) = some (a.value (mul.ready.fst { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | rfl | case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (a.value { val := mul.valid.fst q, property := ?left }) =
some (a.value (mul.ready.fst { val := q, property := h }))
case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ a.ready (mul.valid.fst q) = true | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (a.value { val := mul.valid.fst q, property := ?left }) =
some (a.value (mul.ready.fst { val := q, property := h }))
case left
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ a.ready (mul.valid.fst q) = true
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | rw [Hb, b.strictMono.evalOption_ready] | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h })) | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (b.value { val := mul.valid.snd q, property := ?right }) =
some (b.value (mul.ready.snd { val := q, property := h }))
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ b.ready (mul.valid.snd q) = true | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ evalOption b (↑(mul.valid.snd q)) ((zip a b).index q) = some (b.value (mul.ready.snd { val := q, property := h }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_ready_eq' | [134, 1] | [141, 48] | rfl | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (b.value { val := mul.valid.snd q, property := ?right }) =
some (b.value (mul.ready.snd { val := q, property := h }))
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ b.ready (mul.valid.snd q) = true | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ some (b.value { val := mul.valid.snd q, property := ?right }) =
some (b.value (mul.ready.snd { val := q, property := h }))
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { x // (zip a b).valid x = true }
h : (zip a b).ready q = true
Ha : (zip a b).index q = a.index (mul.valid.fst q)
Hb : (zip a b).index q = b.index (mul.valid.snd q)
⊢ b.ready (mul.valid.snd q) = true
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.left_right_eval_eq_of_toOrder_le | [148, 1] | [154, 8] | simp only [zip_σ, zip_valid, advance_val, zip_seek, evalOption, coe_mul_valid_fst, coe_mul_valid_snd, mul.valid] | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ evalOption b (advance (zip a b) ↑q).2 i = evalOption b (↑(mul.valid.snd q)) i | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) (toOrder (zip a b) q))) i) =
Multiset.get ((evalMultiset b (↑q).2) i) | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ evalOption b (advance (zip a b) ↑q).2 i = evalOption b (↑(mul.valid.snd q)) i
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.left_right_eval_eq_of_toOrder_le | [148, 1] | [154, 8] | rw [IsLawful.seek_spec _ _ _ hi] | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) (toOrder (zip a b) q))) i) =
Multiset.get ((evalMultiset b (↑q).2) i) | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b ↑(mul.valid.snd q)) i) = Multiset.get ((evalMultiset b (↑q).2) i) | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) (toOrder (zip a b) q))) i) =
Multiset.get ((evalMultiset b (↑q).2) i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.left_right_eval_eq_of_toOrder_le | [148, 1] | [154, 8] | rfl | case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b ↑(mul.valid.snd q)) i) = Multiset.get ((evalMultiset b (↑q).2) i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case right
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : { q // (zip a b).valid q = true }
hi : toOrder (zip a b) q ≤ (i, false)
⊢ Multiset.get ((evalMultiset b ↑(mul.valid.snd q)) i) = Multiset.get ((evalMultiset b (↑q).2) i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | apply (a.zip b).wf.induction q | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | clear q | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | intro q ih | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i) | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
⊢ ∀ (x : (zip a b).σ),
(∀ (y : (zip a b).σ),
WfRel (zip a b) y x →
evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)) →
evalOption (zip a b) x i = Option.map₂ Prod.mk (evalOption a x.1 i) (evalOption b x.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | by_cases hv : (a.zip b).valid q | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | swap | case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | have := hv | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv this : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | simp only [zip_valid, Bool.and_eq_true, not_and_or, Bool.not_eq_true] at hv | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv this : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
this : ¬(zip a b).valid q = true
hv : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv this : ¬(zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rcases hv with hv' | hv' <;> simp [this, hv'] | case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
this : ¬(zip a b).valid q = true
hv : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case neg
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
this : ¬(zip a b).valid q = true
hv : a.valid q.1 = false ∨ b.valid q.2 = false
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rcases lt_trichotomy (α := StreamOrder ι) (i, true) ((a.zip b).toOrder ⟨q, hv⟩) with h|h|h | case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) < toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) = toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [Prod.Lex.mk_true_lt_iff_lt, toOrder_fst] at h | case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) < toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) < toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [zip_eq_zero_of_lt_toOrder h] | case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | simp only [zip_σ, zip_valid, coe_mul_valid_fst, coe_mul_valid_snd] at h₂ | case pos.inl.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
h₂ : evalOption b (↑(mul.valid.snd { val := q, property := hv })) i = none
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inl.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
h₂ : evalOption b q.2 i = none
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inl.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
h₂ : evalOption b (↑(mul.valid.snd { val := q, property := hv })) i = none
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | simp [h₂] | case pos.inl.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
h₂ : evalOption b q.2 i = none
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inl.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : i < (zip a b).index { val := q, property := hv }
h₂ : evalOption b q.2 i = none
⊢ none = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [toOrder, Eq.comm, Prod.ext_iff] at h | case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) = toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h :
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).1 = (i, true).1 ∧
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).2 = (i, true).2
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (i, true) = toOrder (zip a b) { val := q, property := hv }
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | simp only [zip_σ, zip_valid, Bool.and_eq_true, decide_eq_true_eq] at h | case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h :
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).1 = (i, true).1 ∧
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).2 = (i, true).2
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (zip a b).index { val := q, property := hv } = i ∧ (zip a b).ready { val := q, property := hv } = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h :
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).1 = (i, true).1 ∧
((zip a b).index { val := q, property := hv }, (zip a b).ready { val := q, property := hv }).2 = (i, true).2
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rcases h with ⟨rfl, hr⟩ | case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (zip a b).index { val := q, property := hv } = i ∧ (zip a b).ready { val := q, property := hv } = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ evalOption (zip a b) q ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a q.1 ((zip a b).index { val := q, property := hv }))
(evalOption b q.2 ((zip a b).index { val := q, property := hv })) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inl
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : (zip a b).index { val := q, property := hv } = i ∧ (zip a b).ready { val := q, property := hv } = true
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [zip_ready_eq hr, (zip_ready_eq'' hr).1, (zip_ready_eq'' hr).2] | case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ evalOption (zip a b) q ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a q.1 ((zip a b).index { val := q, property := hv }))
(evalOption b q.2 ((zip a b).index { val := q, property := hv })) | case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ some
(a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr }),
b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr })) =
Option.map₂ Prod.mk (some (a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr })))
(some (b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr }))) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ evalOption (zip a b) q ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a q.1 ((zip a b).index { val := q, property := hv }))
(evalOption b q.2 ((zip a b).index { val := q, property := hv }))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rfl | case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ some
(a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr }),
b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr })) =
Option.map₂ Prod.mk (some (a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr })))
(some (b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr }))) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inl.intro
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
hv : (zip a b).valid q = true
hr : (zip a b).ready { val := q, property := hv } = true
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q →
evalOption (zip a b) y ((zip a b).index { val := q, property := hv }) =
Option.map₂ Prod.mk (evalOption a y.1 ((zip a b).index { val := q, property := hv }))
(evalOption b y.2 ((zip a b).index { val := q, property := hv }))
⊢ some
(a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr }),
b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr })) =
Option.map₂ Prod.mk (some (a.value (mul.ready.fst { val := { val := q, property := hv }, property := hr })))
(some (b.value (mul.ready.snd { val := { val := q, property := hv }, property := hr })))
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | have not_ready := not_ready_of_toOrder_lt h | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [Prod.Lex.lt_mk_true_iff] at h | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } < (i, true)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | have := left_right_eval_eq_of_toOrder_le h | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rw [(a.zip b).evalOption_not_ready ⟨q, hv⟩ _ not_ready, ih _ ((a.zip b).next_wf ⟨q, hv⟩), this.1, this.2] | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ Option.map₂ Prod.mk (evalOption a (↑(mul.valid.fst { val := q, property := hv })) i)
(evalOption b (↑(mul.valid.snd { val := q, property := hv })) i) =
Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ evalOption (zip a b) q i = Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec | [156, 1] | [182, 10] | rfl | case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ Option.map₂ Prod.mk (evalOption a (↑(mul.valid.fst { val := q, property := hv })) i)
(evalOption b (↑(mul.valid.snd { val := q, property := hv })) i) =
Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case pos.inr.inr
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
i : ι
q : (zip a b).σ
ih :
∀ (y : (zip a b).σ),
WfRel (zip a b) y q → evalOption (zip a b) y i = Option.map₂ Prod.mk (evalOption a y.1 i) (evalOption b y.2 i)
hv : (zip a b).valid q = true
h : toOrder (zip a b) { val := q, property := hv } ≤ (i, false)
not_ready : ¬(zip a b).ready { val := q, property := hv } = true ∨ (zip a b).index { val := q, property := hv } ≠ i
this :
evalOption a (advance (zip a b) ↑{ val := q, property := hv }).1 i =
evalOption a (↑(mul.valid.fst { val := q, property := hv })) i ∧
evalOption b (advance (zip a b) ↑{ val := q, property := hv }).2 i =
evalOption b (↑(mul.valid.snd { val := q, property := hv })) i
⊢ Option.map₂ Prod.mk (evalOption a (↑(mul.valid.fst { val := q, property := hv })) i)
(evalOption b (↑(mul.valid.snd { val := q, property := hv })) i) =
Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i)
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_spec' | [185, 1] | [187, 89] | rw [(zip_strict_mono a.strictMono b.strictMono ).evalMultiset_eq_evalOption, zip_spec] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ (evalMultiset (zip a b) q) i =
Option.getD (Option.map (fun x => {x}) (Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i))) 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : (zip a b).σ
i : ι
⊢ (evalMultiset (zip a b) q) i =
Option.getD (Option.map (fun x => {x}) (Option.map₂ Prod.mk (evalOption a q.1 i) (evalOption b q.2 i))) 0
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_seek_spec | [189, 1] | [193, 37] | simp only [zip_spec', evalOption, zip_seek] | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
j : ι
h : i ≤ (j, false)
⊢ (evalMultiset (zip a b) ((zip a b).seek q i)) j = (evalMultiset (zip a b) ↑q) j | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
j : ι
h : i ≤ (j, false)
⊢ Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (a.seek (mul.valid.fst q) i)) j))
(Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) i)) j))))
0 =
Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (↑q).1) j)) (Multiset.get ((evalMultiset b (↑q).2) j))))
0 | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
j : ι
h : i ≤ (j, false)
⊢ (evalMultiset (zip a b) ((zip a b).seek q i)) j = (evalMultiset (zip a b) ↑q) j
TACTIC:
|
https://github.com/kovach/etch.git | b9e66fe99c33dc1edd926626e598ba00d5d78627 | Etch/StreamFusion/Proofs/StreamZip.lean | Etch.Verification.Stream.zip_seek_spec | [189, 1] | [193, 37] | congr 4 <;>
apply IsLawful.seek_spec _ _ _ h | ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
j : ι
h : i ≤ (j, false)
⊢ Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (a.seek (mul.valid.fst q) i)) j))
(Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) i)) j))))
0 =
Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (↑q).1) j)) (Multiset.get ((evalMultiset b (↑q).2) j))))
0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
ι : Type
inst✝² : LinearOrder ι
α : Type u
β : Type v
a : Stream ι α
b : Stream ι β
inst✝¹ : IsStrictLawful a
inst✝ : IsStrictLawful b
q : { q // (zip a b).valid q = true }
i : StreamOrder ι
j : ι
h : i ≤ (j, false)
⊢ Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (a.seek (mul.valid.fst q) i)) j))
(Multiset.get ((evalMultiset b (b.seek (mul.valid.snd q) i)) j))))
0 =
Option.getD
(Option.map (fun x => {x})
(Option.map₂ Prod.mk (Multiset.get ((evalMultiset a (↑q).1) j)) (Multiset.get ((evalMultiset b (↑q).2) j))))
0
TACTIC:
|
https://github.com/JamesGallicchio/lean_rms.git | b2eba106861c05584458e01a241153abd30d0b5b | RegMachine/Imported.lean | Option.isNone_eq_true | [16, 9] | [18, 25] | cases o <;> simp | α : Type u_1
o : Option α
⊢ isNone o = true ↔ o = none | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
o : Option α
⊢ isNone o = true ↔ o = none
TACTIC:
|
https://github.com/JamesGallicchio/lean_rms.git | b2eba106861c05584458e01a241153abd30d0b5b | RegMachine/Basic.lean | RegMachine.Config.is_halted_haltedOn | [59, 9] | [60, 32] | simp [is_halted, haltedOn] | R L : Type
o : ℕ
r : R → ℕ
⊢ is_halted (haltedOn o r) = true | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
R L : Type
o : ℕ
r : R → ℕ
⊢ is_halted (haltedOn o r) = true
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.