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/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | . simp only [βQPF.map_comp, Function.comp]
rfl | case refl.right
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => (βx).snd) <$>
(fun x =>
{ val := (x, corec (bind.automaton k) (Sum.inr x)),
property :=
(_ :
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) =
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$>
QPF.M.destruct x =
(fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | rfl | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
xβ y x : QPF.M (FreeF F S)
β’ (fun x y => QPF.M.corec (bind.automaton k) (Sum.inr x) = y) (x, corec (bind.automaton k) (Sum.inr x)).fst
(x, corec (bind.automaton k) (Sum.inr x)).snd | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | simp only [βQPF.map_comp, Function.comp] | case refl.left
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, corec (bind.automaton k) (Sum.inr x)),
property :=
(_ :
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) =
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$>
QPF.M.destruct x =
QPF.M.destruct x | case refl.left
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => x) <$> QPF.M.destruct x = QPF.M.destruct x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | apply Eq.trans _ (QPF.map_id _) | case refl.left
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => x) <$> QPF.M.destruct x = QPF.M.destruct x | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => x) <$> QPF.M.destruct x = id <$> QPF.M.destruct x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | rfl | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => x) <$> QPF.M.destruct x = id <$> QPF.M.destruct x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | simp only [βQPF.map_comp, Function.comp] | case refl.right
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => (βx).snd) <$>
(fun x =>
{ val := (x, corec (bind.automaton k) (Sum.inr x)),
property :=
(_ :
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) =
QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$>
QPF.M.destruct x =
(fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x | case refl.right
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => corec (bind.automaton k) (Sum.inr x)) <$> QPF.M.destruct x =
(fun x => QPF.M.corec (bind.automaton k) (Sum.inr x)) <$> QPF.M.destruct x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr.internal | [186, 1] | [205, 10] | rfl | case refl.right
F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x y : QPF.M (FreeF F S)
β’ (fun x => corec (bind.automaton k) (Sum.inr x)) <$> QPF.M.destruct x =
(fun x => QPF.M.corec (bind.automaton k) (Sum.inr x)) <$> QPF.M.destruct x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr | [207, 1] | [212, 14] | intro x | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
β’ β (x : Free F S), corec (bind.automaton k) (Sum.inr x) = x | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x : Free F S
β’ corec (bind.automaton k) (Sum.inr x) = x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr | [207, 1] | [212, 14] | have := Free.bind_inr.internal k x (corec (bind.automaton k) (.inr x)) (by rfl) | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x : Free F S
β’ corec (bind.automaton k) (Sum.inr x) = x | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x : Free F S
this : x = corec (bind.automaton k) (Sum.inr x)
β’ corec (bind.automaton k) (Sum.inr x) = x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr | [207, 1] | [212, 14] | conv =>
rhs
rw [this] | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x : Free F S
this : x = corec (bind.automaton k) (Sum.inr x)
β’ corec (bind.automaton k) (Sum.inr x) = x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_inr | [207, 1] | [212, 14] | rfl | F : Type u β Type u
inst : QPF F
R S : Type u
k : R β Free F S
x : Free F S
β’ corec (bind.automaton k) (Sum.inr x) = corec (bind.automaton k) (Sum.inr x) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | simp only [pure, bind] | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ pure x >>= k = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ corec (bind.automaton k) (Sum.inl (construct (FreeF.Pure x))) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | conv =>
lhs
rw [βconstruct_destruct (corec (bind.automaton k) (.inl (construct <| .Pure x)))]
rw [destruct_corec]
rhs
rhs
simp only [bind.automaton, destruct_construct] | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ corec (bind.automaton k) (Sum.inl (construct (FreeF.Pure x))) = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct (corec (bind.automaton k) <$> Sum.inr <$> destruct (k x)) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | simp only [βQPF.map_comp, Function.comp] | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct (corec (bind.automaton k) <$> Sum.inr <$> destruct (k x)) = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct ((fun x => corec (bind.automaton k) (Sum.inr x)) <$> destruct (k x)) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | conv =>
lhs
congr
lhs
intro x
rw [bind_inr] | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct ((fun x => corec (bind.automaton k) (Sum.inr x)) <$> destruct (k x)) = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct ((fun x => x) <$> destruct (k x)) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | have := QPF.map_id (destruct (k x)) | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
β’ construct ((fun x => x) <$> destruct (k x)) = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
this : id <$> destruct (k x) = destruct (k x)
β’ construct ((fun x => x) <$> destruct (k x)) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | simp only [id] at this | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
this : id <$> destruct (k x) = destruct (k x)
β’ construct ((fun x => x) <$> destruct (k x)) = k x | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
this : (fun a => a) <$> destruct (k x) = destruct (k x)
β’ construct ((fun x => x) <$> destruct (k x)) = k x |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.pure_bind | [214, 9] | [232, 32] | rw [this, construct_destruct] | F : Type u β Type u
inst : QPF F
R S : Type u
x : R
k : R β Free F S
this : (fun a => a) <$> destruct (k x) = destruct (k x)
β’ construct ((fun x => x) <$> destruct (k x)) = k x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.free_bind | [235, 9] | [245, 56] | simp only [free, bind, flip] | F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ free f >>= k = free (flip bind k <$> f) | F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ corec (bind.automaton k) (Sum.inl (construct (FreeF.Free f))) =
construct (FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.free_bind | [235, 9] | [245, 56] | conv =>
lhs
rw [βconstruct_destruct (corec (bind.automaton k) (.inl (construct <| .Free f)))]
rw [destruct_corec]
rhs
rhs
simp only [bind.automaton, destruct_construct] | F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ corec (bind.automaton k) (Sum.inl (construct (FreeF.Free f))) =
construct (FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f)) | F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ construct (corec (bind.automaton k) <$> FreeF.Free (Sum.inl <$> f)) =
construct (FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.free_bind | [235, 9] | [245, 56] | apply congrArg | F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ construct (corec (bind.automaton k) <$> FreeF.Free (Sum.inl <$> f)) =
construct (FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f)) | case h
F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ corec (bind.automaton k) <$> FreeF.Free (Sum.inl <$> f) =
FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.free_bind | [235, 9] | [245, 56] | simp only [Functor.map, βQPF.map_comp, Function.comp] | case h
F : Type u β Type u
inst : QPF F
R S : Type u
f : F (Free F R)
k : R β Free F S
β’ corec (bind.automaton k) <$> FreeF.Free (Sum.inl <$> f) =
FreeF.Free ((fun a => corec (bind.automaton k) (Sum.inl a)) <$> f) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | apply QPF.M.bisim | F : Type u β Type u
inst : QPF F
R : Type u
β’ β (x y : Free F R), x >>= pure = y β x = y | case hβ
F : Type u β Type u
inst : QPF F
R : Type u
β’ β (x y : QPF.M (FreeF F R)),
x >>= pure = y β QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct y) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | intro x y hβ | case hβ
F : Type u β Type u
inst : QPF F
R : Type u
β’ β (x y : QPF.M (FreeF F R)),
x >>= pure = y β QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct y) | case hβ
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
hβ : x >>= pure = y
β’ QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct y) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | induction hβ | case hβ
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
hβ : x >>= pure = y
β’ QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct y) | case hβ.refl
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
β’ QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct (x >>= pure)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | exists (Ξ» x => β¨(x, bind x Free.Monad.pure), by rflβ©) <$> destruct x | case hβ.refl
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
β’ QPF.M.liftr (FreeF F R) (fun x y => x >>= pure = y) (QPF.M.destruct x) (QPF.M.destruct (x >>= pure)) | case hβ.refl
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct x =
QPF.M.destruct x β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct x =
QPF.M.destruct (x >>= pure) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | cases x using by_cases with
| pure r =>
have : destruct (pure r) = .Pure r := by
exact @destruct_construct F _ R (FreeF.Pure r)
simp only [Functor.map, this, pure_bind r]
constructor <;> rfl
| free f =>
have : destruct (free f) = .Free f := by
exact @destruct_construct F _ R (FreeF.Free f)
simp only [Functor.map, this, free_bind, βQPF.map_comp, Function.comp]
constructor
. conv =>
rhs
congr
rw [βQPF.map_id f]
rw [free, construct, QPF.M.destruct_construct]
rfl
. simp only [free, construct, QPF.M.destruct_construct]
rfl | case hβ.refl
F : Type u β Type u
inst : QPF F
R : Type u
x y : QPF.M (FreeF F R)
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct x =
QPF.M.destruct x β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct x =
QPF.M.destruct (x >>= pure) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | rfl | F : Type u β Type u
inst : QPF F
R : Type u
xβ y x : QPF.M (FreeF F R)
β’ (fun x y => x >>= pure = y) (x, x >>= pure).fst (x, x >>= pure).snd | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | have : destruct (pure r) = .Pure r := by
exact @destruct_construct F _ R (FreeF.Pure r) | case hβ.refl.pure
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r >>= pure) | case hβ.refl.pure
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
this : destruct (pure r) = FreeF.Pure r
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r >>= pure) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | simp only [Functor.map, this, pure_bind r] | case hβ.refl.pure
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
this : destruct (pure r) = FreeF.Pure r
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (pure r) =
QPF.M.destruct (pure r >>= pure) | case hβ.refl.pure
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
this : destruct (pure r) = FreeF.Pure r
β’ FreeF.Pure r = QPF.M.destruct (pure r) β§ FreeF.Pure r = QPF.M.destruct (pure r) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | constructor <;> rfl | case hβ.refl.pure
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
this : destruct (pure r) = FreeF.Pure r
β’ FreeF.Pure r = QPF.M.destruct (pure r) β§ FreeF.Pure r = QPF.M.destruct (pure r) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | exact @destruct_construct F _ R (FreeF.Pure r) | F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
r : R
β’ destruct (pure r) = FreeF.Pure r | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | have : destruct (free f) = .Free f := by
exact @destruct_construct F _ R (FreeF.Free f) | case hβ.refl.free
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f >>= pure) | case hβ.refl.free
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f >>= pure) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | simp only [Functor.map, this, free_bind, βQPF.map_comp, Function.comp] | case hβ.refl.free
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f) β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x, x >>= pure),
property := (_ : (x, x >>= pure).fst >>= pure = (x, x >>= pure).fst >>= pure) }) <$>
destruct (free f) =
QPF.M.destruct (free f >>= pure) | case hβ.refl.free
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free f) β§
FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | constructor | case hβ.refl.free
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free f) β§
FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free f)
case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | . conv =>
rhs
congr
rw [βQPF.map_id f]
rw [free, construct, QPF.M.destruct_construct]
rfl | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free f)
case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) | case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | . simp only [free, construct, QPF.M.destruct_construct]
rfl | case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | exact @destruct_construct F _ R (FreeF.Free f) | F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
β’ destruct (free f) = FreeF.Free f | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | conv =>
rhs
congr
rw [βQPF.map_id f] | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free f) | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free (id <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | rw [free, construct, QPF.M.destruct_construct] | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = QPF.M.destruct (free (id <$> f)) | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = FreeF.Free (id <$> f) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | rfl | case hβ.refl.free.left
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x) <$> f) = FreeF.Free (id <$> f) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | simp only [free, construct, QPF.M.destruct_construct] | case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = QPF.M.destruct (free (flip bind pure <$> f)) | case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = FreeF.Free (flip bind pure <$> f) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure.internal | [247, 1] | [270, 10] | rfl | case hβ.refl.free.right
F : Type u β Type u
inst : QPF F
R : Type u
y : QPF.M (FreeF F R)
f : F (Free F R)
this : destruct (free f) = FreeF.Free f
β’ FreeF.Free ((fun x => x >>= pure) <$> f) = FreeF.Free (flip bind pure <$> f) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_pure | [272, 9] | [277, 8] | conv =>
rhs
rw [bind_pure.internal x (bind x pure)]
rfl
rfl | F : Type u β Type u
inst : QPF F
R : Type u
x : Free F R
β’ x >>= pure = x | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | simp only [Free.eq, Free.eqP, pgfp.coinduction] | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
β’ (fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β€ eq | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
β’ (fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β€
eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | intro y z β¨x, hβ, hββ© | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
β’ (fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β€
eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
hβ : x >>= kβ >>= kβ = y
hβ : x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
y z |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | induction hβ | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
hβ : x >>= kβ >>= kβ = y
hβ : x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
y z | case refl
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
hβ : x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(x >>= kβ >>= kβ) z |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | induction hβ | case refl
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
hβ : x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(x >>= kβ >>= kβ) z | case refl.refl
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(x >>= kβ >>= kβ) (x >>= flip bind kβ β kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | cases x using by_cases with
| pure r =>
simp only [pure_bind, flip, Function.comp]
apply @eqF.monotone F inst T eq
. intro x y h
apply Or.inr
apply pgfp.monotone β¨eqF, eqF.monotoneβ© β₯
. intro x y h
cases h
. exact h
. have := eq.refl (kβ r >>= kβ)
rw [eq, eqP, βpgfp.unfold, CompleteLattice.bot_sup] at this
exact this
| free f =>
simp only [βQPF.map_comp, free_bind]
let P : Free F T β Free F T β Prop :=(Ξ» y z:Free F T => β x, (x >>= kβ >>= kβ) = y β§ x >>= (flip bind kβ β kβ) = z)
apply @eqF.monotone F inst T P
. intro x y h
apply Or.inl
exact h
. apply eqF.Free
exists inst.map (Ξ» x => β¨β¨x >>= kβ >>= kβ, x >>= (flip bind kβ β kβ)β©, by exists xβ©) f
simp only [βQPF.map_comp]
constructor
. constructor
. constructor | case refl.refl
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
x : Free F R
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(x >>= kβ >>= kβ) (x >>= flip bind kβ β kβ) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | simp only [pure_bind, flip, Function.comp] | case refl.refl.pure
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(pure r >>= kβ >>= kβ) (pure r >>= flip bind kβ β kβ) | case refl.refl.pure
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z)
(kβ r >>= kβ) (kβ r >>= kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply @eqF.monotone F inst T eq | case refl.refl.pure
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z)
(kβ r >>= kβ) (kβ r >>= kβ) | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eq β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z
case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . intro x y h
apply Or.inr
apply pgfp.monotone β¨eqF, eqF.monotoneβ© β₯
. intro x y h
cases h
. exact h | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eq β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z
case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . have := eq.refl (kβ r >>= kβ)
rw [eq, eqP, βpgfp.unfold, CompleteLattice.bot_sup] at this
exact this | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | intro x y h | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eq β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ ((fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z)
x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply Or.inr | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ ((fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z)
x y | case refl.refl.pure.a.h
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) })
(fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply pgfp.monotone β¨eqF, eqF.monotoneβ© β₯ | case refl.refl.pure.a.h
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) })
(fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z) x y | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β₯ β€ fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z
case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯ x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . intro x y h
cases h | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β₯ β€ fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z
case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯ x y | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯ x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . exact h | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯ x y | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | intro x y h | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β₯ β€ fun y z => β x, x >>= kβ >>= kβ = y β§ (x >>= fun x => kβ x >>= kβ) = z | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβΒΉ z : Free F T
r : R
xβ yβ : Free F T
hβ : eq xβ yβ
x y : Free F T
h : β₯ x y
β’ β x_1, x_1 >>= kβ >>= kβ = x β§ (x_1 >>= fun x => kβ x >>= kβ) = y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | cases h | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβΒΉ z : Free F T
r : R
xβ yβ : Free F T
hβ : eq xβ yβ
x y : Free F T
h : β₯ x y
β’ β x_1, x_1 >>= kβ >>= kβ = x β§ (x_1 >>= fun x => kβ x >>= kβ) = y | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | exact h | case refl.refl.pure.a.h.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
r : R
x y : Free F T
h : eq x y
β’ β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯ x y | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | have := eq.refl (kβ r >>= kβ) | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
this : eq (kβ r >>= kβ) (kβ r >>= kβ)
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | rw [eq, eqP, βpgfp.unfold, CompleteLattice.bot_sup] at this | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
this : eq (kβ r >>= kβ) (kβ r >>= kβ)
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
this :
β{ toFun := eqF, monotone' := (_ : Monotone eqF) } (β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯)
(kβ r >>= kβ) (kβ r >>= kβ)
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | exact this | case refl.refl.pure.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
r : R
this :
β{ toFun := eqF, monotone' := (_ : Monotone eqF) } (β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) β₯)
(kβ r >>= kβ) (kβ r >>= kβ)
β’ eqF eq (kβ r >>= kβ) (kβ r >>= kβ) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | simp only [βQPF.map_comp, free_bind] | case refl.refl.free
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(free f >>= kβ >>= kβ) (free f >>= flip bind kβ β kβ) | case refl.refl.free
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | let P : Free F T β Free F T β Prop :=(Ξ» y z:Free F T => β x, (x >>= kβ >>= kβ) = y β§ x >>= (flip bind kβ β kβ) = z) | case refl.refl.free
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) | case refl.refl.free
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply @eqF.monotone F inst T P | case refl.refl.free
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF
((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
(free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ P β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF P (free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . intro x y h
apply Or.inl
exact h | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ P β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF P (free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF P (free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . apply eqF.Free
exists inst.map (Ξ» x => β¨β¨x >>= kβ >>= kβ, x >>= (flip bind kβ β kβ)β©, by exists xβ©) f
simp only [βQPF.map_comp]
constructor
. constructor
. constructor | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF P (free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | intro x y h | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ P β€
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
x y : Free F T
h : P x y
β’ ((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply Or.inl | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
x y : Free F T
h : P x y
β’ ((fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) β
β(pgfp { toFun := eqF, monotone' := (_ : Monotone eqF) }) fun y z =>
β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z)
x y | case refl.refl.free.a.h
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
x y : Free F T
h : P x y
β’ (fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | exact h | case refl.refl.free.a.h
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
yβ z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
x y : Free F T
h : P x y
β’ (fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) x y | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | apply eqF.Free | case refl.refl.free.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ eqF P (free ((flip bind kβ β flip bind kβ) <$> f)) (free (flip bind (flip bind kβ β kβ) <$> f)) | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ QPF.M.liftr F P ((flip bind kβ β flip bind kβ) <$> f) (flip bind (flip bind kβ β kβ) <$> f) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | exists inst.map (Ξ» x => β¨β¨x >>= kβ >>= kβ, x >>= (flip bind kβ β kβ)β©, by exists xβ©) f | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ QPF.M.liftr F P ((flip bind kβ β flip bind kβ) <$> f) (flip bind (flip bind kβ β kβ) <$> f) | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | simp only [βQPF.map_comp] | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ (fun x => (βx).fst) <$>
(fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f β§
(fun x => (βx).snd) <$>
(fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).fst) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f β§
((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | constructor | case refl.refl.free.a.a
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).fst) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f β§
((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f | case refl.refl.free.a.a.left
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).fst) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f
case refl.refl.free.a.a.right
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . constructor | case refl.refl.free.a.a.left
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).fst) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f
case refl.refl.free.a.a.right
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f | case refl.refl.free.a.a.right
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | . constructor | case refl.refl.free.a.a.right
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | exists x | F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
x : Free F R
β’ P (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | constructor | case refl.refl.free.a.a.left
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).fst) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
(flip bind kβ β flip bind kβ) <$> f | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind.internal | [283, 1] | [314, 20] | constructor | case refl.refl.free.a.a.right
F : Type u β Type u
inst : QPF F
R S T : Type u
kβ : R β Free F S
kβ : S β Free F T
y z : Free F T
f : F (Free F R)
P : Free F T β Free F T β Prop := fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z
β’ ((fun x => (βx).snd) β fun x =>
{ val := (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ),
property :=
(_ :
β x_1,
x_1 >>= kβ >>= kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).fst β§
x_1 >>= flip bind kβ β kβ = (x >>= kβ >>= kβ, x >>= flip bind kβ β kβ).snd) }) <$>
f =
flip bind (flip bind kβ β kβ) <$> f | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind | [316, 1] | [322, 11] | have hβ := bind_bind.internal kβ kβ (t >>= kβ >>= kβ) (t >>= (flip bind kβ β kβ)) | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
β’ t >>= kβ >>= kβ = t >>= flip bind kβ β kβ | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
β’ t >>= kβ >>= kβ = t >>= flip bind kβ β kβ |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind | [316, 1] | [322, 11] | have hβ := Free.eq.bisim (t >>= kβ >>= kβ) (t >>= (flip bind kβ β kβ)) | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
β’ t >>= kβ >>= kβ = t >>= flip bind kβ β kβ | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ t >>= kβ >>= kβ = t >>= flip bind kβ β kβ |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind | [316, 1] | [322, 11] | apply hβ | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ t >>= kβ >>= kβ = t >>= flip bind kβ β kβ | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind | [316, 1] | [322, 11] | apply hβ | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ β x, x >>= kβ >>= kβ = t >>= kβ >>= kβ β§ x >>= flip bind kβ β kβ = t >>= flip bind kβ β kβ |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/QPF/FreeMonads.lean | Free.bind_bind | [316, 1] | [322, 11] | exists t | F : Type u β Type u
inst : QPF F
R S T : Type u
t : Free F R
kβ : R β Free F S
kβ : S β Free F T
hβ :
(fun y z => β x, x >>= kβ >>= kβ = y β§ x >>= flip bind kβ β kβ = z) (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β€
eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ)
hβ : eq (t >>= kβ >>= kβ) (t >>= flip bind kβ β kβ) β t >>= kβ >>= kβ = t >>= flip bind kβ β kβ
β’ β x, x >>= kβ >>= kβ = t >>= kβ >>= kβ β§ x >>= flip bind kβ β kβ = t >>= flip bind kβ β kβ | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.equiv.coinduction | [129, 1] | [134, 11] | intro h x y h' | C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
β’ (β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y) β
β (x : Free C R) (y : Free C S), P x y β equiv eq x y | C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ equiv eq x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.equiv.coinduction | [129, 1] | [134, 11] | apply (pgfp.coinduction (equivF' eq) P).2 | C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ equiv eq x y | case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P β€ β(equivF' eq) (P β β(pgfp (equivF' eq)) P)
case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.equiv.coinduction | [129, 1] | [134, 11] | apply h | case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P β€ β(equivF' eq) (P β β(pgfp (equivF' eq)) P)
case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P x y | case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P x y |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.equiv.coinduction | [129, 1] | [134, 11] | apply h' | case a
C : _root_.Container
R S : Type uβ
eq : R β S β Prop
P : Free C R β Free C S β Prop
h : β (x : Free C R) (y : Free C S), P x y β equivF eq (P β pequiv eq P) x y
x : Free C R
y : Free C S
h' : P x y
β’ P x y | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | apply M.bisim | C : _root_.Container
R : Type uβ
β’ β (x y : Free C R), eq x y β x = y | case hβ
C : _root_.Container
R : Type uβ
β’ β (x y : M (Container C R)),
eq x y β
β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | intro x y hβ | case hβ
C : _root_.Container
R : Type uβ
β’ β (x y : M (Container C R)),
eq x y β
β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : eq x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | simp [eq, equiv, pequiv] at hβ | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : eq x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : β(pgfp (equivF' Eq)) β₯ x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | rw [βpgfp.unfold] at hβ | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : β(pgfp (equivF' Eq)) β₯ x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : β(equivF' Eq) (β₯ β β(pgfp (equivF' Eq)) β₯) x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | cases hβ with
| Pure x y hβ =>
induction hβ
exists (A.Pure x)
exists (Ξ» e => e.casesOn)
exists (Ξ» e => e.casesOn)
simp only [construct, M.destruct_construct, inv, true_and]
intro x
apply x.elim
| Free node kβ kβ h =>
exists (A.Free node)
exists kβ
exists kβ
simp only [construct, M.destruct_construct, inv, true_and]
intro x
rw [CompleteLattice.bot_sup] at h
apply h | case hβ
C : _root_.Container
R : Type uβ
x y : M (Container C R)
hβ : β(equivF' Eq) (β₯ β β(pgfp (equivF' Eq)) β₯) x y
β’ β node kβ kβ,
M.destruct x = { fst := node, snd := kβ } β§
M.destruct y = { fst := node, snd := kβ } β§ β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | no goals |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | induction hβ | case hβ.Pure
C : _root_.Container
R : Type uβ
x y : R
hβ : x = y
β’ β node kβ kβ,
M.destruct (construct (Functor.Pure x)) = { fst := node, snd := kβ } β§
M.destruct (construct (Functor.Pure y)) = { fst := node, snd := kβ } β§
β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β node kβ kβ,
M.destruct (construct (Functor.Pure x)) = { fst := node, snd := kβ } β§
M.destruct (construct (Functor.Pure x)) = { fst := node, snd := kβ } β§
β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | exists (A.Pure x) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β node kβ kβ,
M.destruct (construct (Functor.Pure x)) = { fst := node, snd := kβ } β§
M.destruct (construct (Functor.Pure x)) = { fst := node, snd := kβ } β§
β (i : Container.B (Container C R) node), eq (kβ i) (kβ i) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β kβ kβ,
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
β (i : Container.B (Container C R) (A.Pure x)), eq (kβ i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | exists (Ξ» e => e.casesOn) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β kβ kβ,
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
β (i : Container.B (Container C R) (A.Pure x)), eq (kβ i) (kβ i) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β kβ,
M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
β (i : Container.B (Container C R) (A.Pure x)),
eq ((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i) (kβ i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | exists (Ξ» e => e.casesOn) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β kβ,
M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
M.destruct (construct (Functor.Pure x)) = { fst := A.Pure x, snd := kβ } β§
β (i : Container.B (Container C R) (A.Pure x)),
eq ((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i) (kβ i) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
β (i : Container.B (Container C R) (A.Pure x)),
eq ((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i)
((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i) |
https://github.com/RemyCiterin/LeanCoInd.git | 69d305ae769624f460f9c1ee6a0351917f4b74cf | CoInd/FreeMonads.lean | Free.eq.bisim | [136, 1] | [158, 12] | simp only [construct, M.destruct_construct, inv, true_and] | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
M.destruct (construct (Functor.Pure x)) =
{ fst := A.Pure x, snd := fun e => PEmpty.casesOn (fun x => M (Container C R)) e } β§
β (i : Container.B (Container C R) (A.Pure x)),
eq ((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i)
((fun e => PEmpty.casesOn (fun x => M (Container C R)) e) i) | case hβ.Pure.refl
C : _root_.Container
R : Type uβ
x y : R
β’ β (i : Container.B (Container C R) (A.Pure x)),
eq (PEmpty.rec (fun x => M (Container C R)) i) (PEmpty.rec (fun x => M (Container C R)) i) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.