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)