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
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.Vec.meld_append
[167, 1]
[180, 73]
rw [ih]
Ξ± Ξ² Ξ³ : Type m n : β„• f : Ξ± β†’ Ξ² β†’ Ξ³ v : Ξ± n✝ : β„• vs : Vec Ξ± n✝ w : Ξ² ws : Vec Ξ² n✝ xs : Vec Ξ± m ys : Vec Ξ² m ih : meld f (append vs xs) (append ws ys) = append (meld f vs ws) (meld f xs ys) ⊒ cons (f v w) (meld f (append vs xs) (append ws ys)) = cons (f v w) (append (meld f vs ws) (meld f xs ys))
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.drop_nil
[300, 9]
[303, 20]
rfl
α : Type ⊒ drop 0 [] = []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.drop_nil
[300, 9]
[303, 20]
rfl
Ξ± : Type n✝ : β„• ⊒ drop (n✝ + 1) [] = []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_nil
[305, 9]
[308, 20]
rfl
α : Type ⊒ take 0 [] = []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_nil
[305, 9]
[308, 20]
rfl
Ξ± : Type n✝ : β„• ⊒ take (n✝ + 1) [] = []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.drop_drop
[317, 1]
[322, 50]
rfl
Ξ± : Type n : β„• xs : List Ξ± ⊒ drop n (drop 0 xs) = drop (n + 0) xs
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.drop_drop
[317, 1]
[322, 50]
simp [drop]
Ξ± : Type n✝ x✝ : β„• ⊒ drop x✝ (drop (n✝ + 1) []) = drop (x✝ + (n✝ + 1)) []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.drop_drop
[317, 1]
[322, 50]
simp [drop, drop_drop m n xs, ← add_assoc]
Ξ± : Type m n : β„• head✝ : Ξ± xs : List Ξ± ⊒ drop n (drop (m + 1) (head✝ :: xs)) = drop (n + (m + 1)) (head✝ :: xs)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_take
[324, 1]
[328, 53]
rfl
α : Type x✝ : List α ⊒ take 0 (take 0 x✝) = take 0 x✝
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_take
[324, 1]
[328, 53]
rfl
Ξ± : Type n✝ : β„• ⊒ take (n✝ + 1) (take (n✝ + 1) []) = take (n✝ + 1) []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_take
[324, 1]
[328, 53]
simp [take, take_take m xs]
Ξ± : Type m : β„• x : Ξ± xs : List Ξ± ⊒ take (m + 1) (take (m + 1) (x :: xs)) = take (m + 1) (x :: xs)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_drop
[330, 1]
[334, 56]
rfl
α : Type x✝ : List α ⊒ take 0 x✝ ++ drop 0 x✝ = x✝
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_drop
[330, 1]
[334, 56]
rfl
Ξ± : Type n✝ : β„• ⊒ take (n✝ + 1) [] ++ drop (n✝ + 1) [] = []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab4Solution.lean
LoVe.take_drop
[330, 1]
[334, 56]
simp [take, drop, take_drop m]
Ξ± : Type m : β„• x : Ξ± xs : List Ξ± ⊒ take (m + 1) (x :: xs) ++ drop (m + 1) (x :: xs) = x :: xs
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
let R (x y: M C) := x = construct (destruct y)
C : Container x : M C ⊒ construct (destruct x) = x
C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ construct (destruct x) = x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
apply bisim R
C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ construct (destruct x) = x
case hβ‚€ C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M C), R x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i) case a C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. intro x y hβ‚€ have hβ‚€ := congrArg destruct hβ‚€ cases h₁:destruct y case mk node kβ‚‚ => rw [h₁] at hβ‚€ simp only [construct, destruct_corec, Map] at hβ‚€ simp only [construct.automaton, Map] at hβ‚€ exists node exists construct ∘ destruct ∘ kβ‚‚ exists kβ‚‚ constructor . exact hβ‚€ . constructor . rfl . intro i rfl
case hβ‚€ C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M C), R x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i) case a C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
case a C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. rfl
case a C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
intro x y hβ‚€
case hβ‚€ C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M C), R x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
case hβ‚€ C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€ : R x y ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
have hβ‚€ := congrArg destruct hβ‚€
case hβ‚€ C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€ : R x y ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
case hβ‚€ C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
cases h₁:destruct y
case hβ‚€ C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
case hβ‚€.mk C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) fst✝ : C.A snd✝ : B C fst✝ β†’ M C h₁ : destruct y = { fst := fst✝, snd := snd✝ } ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ { fst := fst✝, snd := snd✝ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
case mk node kβ‚‚ => rw [h₁] at hβ‚€ simp only [construct, destruct_corec, Map] at hβ‚€ simp only [construct.automaton, Map] at hβ‚€ exists node exists construct ∘ destruct ∘ kβ‚‚ exists kβ‚‚ constructor . exact hβ‚€ . constructor . rfl . intro i rfl
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
rw [h₁] at hβ‚€
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C hβ‚€ : destruct x = destruct (construct { fst := node, snd := kβ‚‚ }) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
simp only [construct, destruct_corec, Map] at hβ‚€
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C hβ‚€ : destruct x = destruct (construct { fst := node, snd := kβ‚‚ }) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := (construct.automaton { fst := node, snd := kβ‚‚ }).fst, snd := corec construct.automaton ∘ (construct.automaton { fst := node, snd := kβ‚‚ }).snd } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
simp only [construct.automaton, Map] at hβ‚€
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := (construct.automaton { fst := node, snd := kβ‚‚ }).fst, snd := corec construct.automaton ∘ (construct.automaton { fst := node, snd := kβ‚‚ }).snd } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
exists node
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node_1), R (k₁ i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ k₁ kβ‚‚_1, destruct x = { fst := node, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚_1 i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
exists construct ∘ destruct ∘ kβ‚‚
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ k₁ kβ‚‚_1, destruct x = { fst := node, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node), R (k₁ i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ kβ‚‚_1, destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚_1 i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
exists kβ‚‚
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆƒ kβ‚‚_1, destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚_1 i)
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
constructor
C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
case left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } case right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. exact hβ‚€
case left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ } case right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
case right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. constructor . rfl . intro i rfl
case right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
exact hβ‚€
case left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ destruct x = { fst := node, snd := construct ∘ destruct ∘ kβ‚‚ }
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
constructor
case right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
case right.left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. rfl
case right.left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
. intro i rfl
case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
rfl
case right.left C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ }
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
intro i
case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } ⊒ βˆ€ (i : B C node), R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } i : B C node ⊒ R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
rfl
case right.right C : Container x✝ : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) x y : M C hβ‚€βœ : R x y node : C.A kβ‚‚ : B C node β†’ M C h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := (corec fun x => { fst := x.fst, snd := destruct ∘ x.snd }) ∘ destruct ∘ kβ‚‚ } i : B C node ⊒ R ((construct ∘ destruct ∘ kβ‚‚) i) (kβ‚‚ i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
Container.M.construct_destruct
[16, 1]
[36, 8]
rfl
case a C : Container x : M C R : M C β†’ M C β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
let R i (x y: M C i) := x = construct (destruct y)
I : Type uβ‚€ C : IContainer I i : I x : M C i ⊒ construct (destruct x) = x
I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ construct (destruct x) = x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
apply bisim R
I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ construct (destruct x) = x
case hβ‚€ I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ βˆ€ (i : I) (x y : M C i), R i x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z) case a I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ R i (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. intro i x y hβ‚€ have hβ‚€ := congrArg destruct hβ‚€ cases h₁:destruct y case mk node kβ‚‚ => rw [h₁] at hβ‚€ simp only [construct, destruct_corec, Map] at hβ‚€ simp only [construct.automaton, Map] at hβ‚€ exists node exists Ξ» (x:B C i node) => construct <| destruct <| kβ‚‚ x exists kβ‚‚ constructor . exact hβ‚€ . constructor . rfl . intro i rfl
case hβ‚€ I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ βˆ€ (i : I) (x y : M C i), R i x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z) case a I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ R i (construct (destruct x)) x
case a I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ R i (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. rfl
case a I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ R i (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
intro i x y hβ‚€
case hβ‚€ I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ βˆ€ (i : I) (x y : M C i), R i x y β†’ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
case hβ‚€ I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€ : R i x y ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
have hβ‚€ := congrArg destruct hβ‚€
case hβ‚€ I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€ : R i x y ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
case hβ‚€ I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
cases h₁:destruct y
case hβ‚€ I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ destruct y = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
case hβ‚€.mk I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y hβ‚€ : destruct x = destruct (construct (destruct y)) fst✝ : A C i snd✝ : (y : B C i fst✝) β†’ M C (N C i fst✝ y) h₁ : destruct y = { fst := fst✝, snd := snd✝ } ⊒ βˆƒ node k₁ kβ‚‚, destruct x = { fst := node, snd := k₁ } ∧ { fst := fst✝, snd := snd✝ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
case mk node kβ‚‚ => rw [h₁] at hβ‚€ simp only [construct, destruct_corec, Map] at hβ‚€ simp only [construct.automaton, Map] at hβ‚€ exists node exists Ξ» (x:B C i node) => construct <| destruct <| kβ‚‚ x exists kβ‚‚ constructor . exact hβ‚€ . constructor . rfl . intro i rfl
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y hβ‚€ : destruct x = destruct (construct (destruct y)) node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
rw [h₁] at hβ‚€
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y hβ‚€ : destruct x = destruct (construct (destruct y)) node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) hβ‚€ : destruct x = destruct (construct { fst := node, snd := kβ‚‚ }) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
simp only [construct, destruct_corec, Map] at hβ‚€
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) hβ‚€ : destruct x = destruct (construct { fst := node, snd := kβ‚‚ }) h₁ : destruct y = { fst := node, snd := kβ‚‚ } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = match construct.automaton i { fst := node, snd := kβ‚‚ } with | { fst := x, snd := k } => { fst := x, snd := fun y => corec construct.automaton (k y) } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
simp only [construct.automaton, Map] at hβ‚€
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = match construct.automaton i { fst := node, snd := kβ‚‚ } with | { fst := x, snd := k } => { fst := x, snd := fun y => corec construct.automaton (k y) } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
exists node
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ node_1 k₁ kβ‚‚_1, destruct x = { fst := node_1, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node_1, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node_1), R (N C i node_1 z) (k₁ z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ k₁ kβ‚‚_1, destruct x = { fst := node, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚_1 z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
exists Ξ» (x:B C i node) => construct <| destruct <| kβ‚‚ x
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ k₁ kβ‚‚_1, destruct x = { fst := node, snd := k₁ } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node), R (N C i node z) (k₁ z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ kβ‚‚_1, destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚_1 z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
exists kβ‚‚
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆƒ kβ‚‚_1, destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚_1 } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚_1 z)
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
constructor
I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } ∧ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
case left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } case right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. exact hβ‚€
case left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) } case right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
case right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. constructor . rfl . intro i rfl
case right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
exact hβ‚€
case left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ destruct x = { fst := node, snd := fun x => construct (destruct (kβ‚‚ x)) }
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
constructor
case right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } ∧ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
case right.left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } case right.right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. rfl
case right.left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ } case right.right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
case right.right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
. intro i rfl
case right.right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
rfl
case right.left I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ { fst := node, snd := kβ‚‚ } = { fst := node, snd := kβ‚‚ }
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
intro i
case right.right I : Type uβ‚€ C : IContainer I i✝ : I x✝ : M C i✝ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i : I x y : M C i hβ‚€βœ : R i x y node : A C i kβ‚‚ : (y : B C i node) β†’ M C (N C i node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } ⊒ βˆ€ (z : B C i node), R (N C i node z) ((fun x => construct (destruct (kβ‚‚ x))) z) (kβ‚‚ z)
case right.right I : Type uβ‚€ C : IContainer I i✝¹ : I x✝ : M C i✝¹ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i✝ : I x y : M C i✝ hβ‚€βœ : R i✝ x y node : A C i✝ kβ‚‚ : (y : B C i✝ node) β†’ M C (N C i✝ node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } i : B C i✝ node ⊒ R (N C i✝ node i) ((fun x => construct (destruct (kβ‚‚ x))) i) (kβ‚‚ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
rfl
case right.right I : Type uβ‚€ C : IContainer I i✝¹ : I x✝ : M C i✝¹ R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) i✝ : I x y : M C i✝ hβ‚€βœ : R i✝ x y node : A C i✝ kβ‚‚ : (y : B C i✝ node) β†’ M C (N C i✝ node y) h₁ : destruct y = { fst := node, snd := kβ‚‚ } hβ‚€ : destruct x = { fst := node, snd := fun y => corec (fun i x => match x with | { fst := x, snd := k } => { fst := x, snd := fun y => destruct (k y) }) (destruct (kβ‚‚ y)) } i : B C i✝ node ⊒ R (N C i✝ node i) ((fun x => construct (destruct (kβ‚‚ x))) i) (kβ‚‚ i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
IContainer.M.construct_destruct
[84, 1]
[104, 8]
rfl
case a I : Type uβ‚€ C : IContainer I i : I x : M C i R : (i : I) β†’ M C i β†’ M C i β†’ Prop := fun i x y => x = construct (destruct y) ⊒ R i (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
let R (x y: M F) := x = construct (destruct y)
F : Type u₁ β†’ Type u₁ inst : QPF F x : M F ⊒ construct (destruct x) = x
F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ construct (destruct x) = x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
apply bisim R
F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ construct (destruct x) = x
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M F), R x y β†’ liftr F R (destruct x) (destruct y) case a F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
. intro x y hβ‚€ have hβ‚€ := congrArg destruct hβ‚€ simp [liftr] simp only [construct, destruct_corec, construct.automaton] at hβ‚€ exists Functor.map (Ξ» a => ⟨⟨construct <| destruct a, a⟩, by simp⟩) (destruct y) rw [hβ‚€] constructor . simp only [←QPF.map_comp] rfl . rw [←QPF.M.map_comp] have : inst.map id (destruct y) = destruct y := by rw [QPF.map_id] apply Eq.trans _ this apply congrFun funext _ rfl
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M F), R x y β†’ liftr F R (destruct x) (destruct y) case a F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
case a F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
. rfl
case a F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
intro x y hβ‚€
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ βˆ€ (x y : M F), R x y β†’ liftr F R (destruct x) (destruct y)
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€ : R x y ⊒ liftr F R (destruct x) (destruct y)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
have hβ‚€ := congrArg destruct hβ‚€
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€ : R x y ⊒ liftr F R (destruct x) (destruct y)
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ liftr F R (destruct x) (destruct y)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
simp [liftr]
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ liftr F R (destruct x) (destruct y)
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ z, (fun x => (↑x).fst) <$> z = destruct x ∧ (fun x => (↑x).snd) <$> z = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
simp only [construct, destruct_corec, construct.automaton] at hβ‚€
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = destruct (construct (destruct y)) ⊒ βˆƒ z, (fun x => (↑x).fst) <$> z = destruct x ∧ (fun x => (↑x).snd) <$> z = destruct y
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ βˆƒ z, (fun x => (↑x).fst) <$> z = destruct x ∧ (fun x => (↑x).snd) <$> z = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
exists Functor.map (λ a => ⟨⟨construct <| destruct a, a⟩, by simp⟩) (destruct y)
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ βˆƒ z, (fun x => (↑x).fst) <$> z = destruct x ∧ (fun x => (↑x).snd) <$> z = destruct y
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct x ∧ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rw [hβ‚€]
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct x ∧ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ∧ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
constructor
case hβ‚€ F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ∧ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
case hβ‚€.left F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
. simp only [←QPF.map_comp] rfl
case hβ‚€.left F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
. rw [←QPF.M.map_comp] have : inst.map id (destruct y) = destruct y := by rw [QPF.map_id] apply Eq.trans _ this apply congrFun funext _ rfl
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
simp
F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y a : M F ⊒ (construct (destruct a), a).fst = construct (destruct (construct (destruct a), a).snd)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
simp only [←QPF.map_comp]
case hβ‚€.left F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).fst) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y
case hβ‚€.left F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ ((fun x => (↑x).fst) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = ((fun x => corec (Functor.map destruct) x) ∘ destruct) <$> destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rfl
case hβ‚€.left F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ ((fun x => (↑x).fst) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = ((fun x => corec (Functor.map destruct) x) ∘ destruct) <$> destruct y
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rw [←QPF.M.map_comp]
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ (fun x => (↑x).snd) <$> (fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
have : inst.map id (destruct y) = destruct y := by rw [QPF.map_id]
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
apply Eq.trans _ this
case hβ‚€.right F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = destruct y
F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = id <$> destruct y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
apply congrFun
F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> destruct y = id <$> destruct y
case h F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ Functor.map ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) = Functor.map id
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
funext _
case h F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y ⊒ Functor.map ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) = Functor.map id
case h.h F : Type u₁ β†’ Type u₁ inst : QPF F x✝¹ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y x✝ : F (M F) ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> x✝ = id <$> x✝
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rfl
case h.h F : Type u₁ β†’ Type u₁ inst : QPF F x✝¹ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y this : id <$> destruct y = destruct y x✝ : F (M F) ⊒ ((fun x => (↑x).snd) ∘ fun a => { val := (construct (destruct a), a), property := (_ : construct (destruct a) = construct (destruct a)) }) <$> x✝ = id <$> x✝
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rw [QPF.map_id]
F : Type u₁ β†’ Type u₁ inst : QPF F x✝ : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) x y : M F hβ‚€βœ : R x y hβ‚€ : destruct x = (fun x => corec (Functor.map destruct) x) <$> destruct <$> destruct y ⊒ id <$> destruct y = destruct y
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/Utils.lean
QPF.M.construct_destruct
[152, 1]
[172, 8]
rfl
case a F : Type u₁ β†’ Type u₁ inst : QPF F x : M F R : M F β†’ M F β†’ Prop := fun x y => x = construct (destruct y) ⊒ R (construct (destruct x)) x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.destruct_corec
[107, 1]
[111, 6]
simp only [corec, destruct]
C : Container Ξ± : Type u₃ f : Ξ± β†’ Obj C Ξ± xβ‚€ : Ξ± ⊒ destruct (corec f xβ‚€) = Map (corec f) (f xβ‚€)
C : Container Ξ± : Type u₃ f : Ξ± β†’ Obj C Ξ± xβ‚€ : Ξ± ⊒ { fst := node { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) }, snd := children { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) } } = Map (fun xβ‚€ => { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) }) (f xβ‚€)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.destruct_corec
[107, 1]
[111, 6]
rfl
C : Container Ξ± : Type u₃ f : Ξ± β†’ Obj C Ξ± xβ‚€ : Ξ± ⊒ { fst := node { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) }, snd := children { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) } } = Map (fun xβ‚€ => { approx := Approx.corec f xβ‚€, agrees := (_ : βˆ€ (n : Nat), Agree (Approx.corec f xβ‚€ n) (Approx.corec f xβ‚€ (Nat.succ n))) }) (f xβ‚€)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.Eq_from_Heq
[115, 1]
[119, 17]
cases h
C : Container Ξ± Ξ² : Sort u₁ i : Ξ± j : Ξ² hβ‚€ : Ξ± = Ξ² h : HEq i j ⊒ cast hβ‚€ i = j
case refl C : Container Ξ± : Sort u₁ i : Ξ± hβ‚€ : Ξ± = Ξ± ⊒ cast hβ‚€ i = i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.Eq_from_Heq
[115, 1]
[119, 17]
apply eq_of_heq
case refl C : Container Ξ± : Sort u₁ i : Ξ± hβ‚€ : Ξ± = Ξ± ⊒ cast hβ‚€ i = i
case refl.h C : Container Ξ± : Sort u₁ i : Ξ± hβ‚€ : Ξ± = Ξ± ⊒ HEq (cast hβ‚€ i) i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.Eq_from_Heq
[115, 1]
[119, 17]
apply cast_heq
case refl.h C : Container Ξ± : Sort u₁ i : Ξ± hβ‚€ : Ξ± = Ξ± ⊒ HEq (cast hβ‚€ i) i
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
intro x n i j heq
C : Container ⊒ βˆ€ (x : M C) (n : Nat) (i : B C (Approx.node (approx x (Nat.succ n)))) (j : B C (destruct x).fst), HEq i j β†’ Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
have : i = cast (by rw [node_thm]; simp [destruct]) j := by have : C.B x.destruct.fst = C.B (x.approx (.succ n)).node := by rw [node_thm]; simp [destruct] rw [Eq_from_Heq j i] apply HEq.symm assumption
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : i = cast (_ : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))) j ⊒ Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
simp only [this, children, Approx.node, destruct]
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : i = cast (_ : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))) j ⊒ Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
rw [node_thm]
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ B C (destruct x).fst = B C (node x)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
simp [destruct]
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ B C (destruct x).fst = B C (node x)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
have : C.B x.destruct.fst = C.B (x.approx (.succ n)).node := by rw [node_thm]; simp [destruct]
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j ⊒ i = cast (_ : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))) j
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊒ i = cast (_ : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))) j
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
rw [Eq_from_Heq j i]
C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊒ i = cast (_ : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n)))) j
case h C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊒ HEq j i