l3lab/ntp-mathlib huggingface dataset:
/-- The product of two partial equivalences, as a partial equivalence on the product. -/
def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α × γ) (β × δ) where
  source := e.source ×ˢ e'.source
  target := e.target ×ˢ e'.target
  toFun p := (e p.1, e' p.2)
  invFun p := (e.symm p.1, e'.symm p.2)
  map_source' p hp := by
    simp at hp
    simp [hp]
  map_target' p hp := by
    simp at hp
    simp [map_target, hp]
  left_inv' p hp := by
    simp at hp
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
p : α × γ
hp : p.1 ∈ e.source ∧ p.2 ∈ e'.source
⊢ (fun p => (↑(PartialEquiv.symm e) p.1, ↑(PartialEquiv.symm e') p.2)) ((fun p => (↑e p.1, ↑e' p.2)) p) = p

Next tactic:
simp [hp]
/-- The product of two partial equivalences, as a partial equivalence on the product. -/
def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α × γ) (β × δ) where
  source := e.source ×ˢ e'.source
  target := e.target ×ˢ e'.target
  toFun p := (e p.1, e' p.2)
  invFun p := (e.symm p.1, e'.symm p.2)
  map_source' p hp := by
    simp at hp
    simp [hp]
  map_target' p hp := by
    simp at hp
    simp [map_target, hp]
  left_inv' p hp := by
    simp at hp
    simp [hp]
  right_inv' p hp := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
p : β × δ
hp : p ∈ e.target ×ˢ e'.target
⊢ (fun p => (↑e p.1, ↑e' p.2)) ((fun p => (↑(PartialEquiv.symm e) p.1, ↑(PartialEquiv.symm e') p.2)) p) = p

Next tactic:
simp at hp
/-- The product of two partial equivalences, as a partial equivalence on the product. -/
def prod (e : PartialEquiv α β) (e' : PartialEquiv γ δ) : PartialEquiv (α × γ) (β × δ) where
  source := e.source ×ˢ e'.source
  target := e.target ×ˢ e'.target
  toFun p := (e p.1, e' p.2)
  invFun p := (e.symm p.1, e'.symm p.2)
  map_source' p hp := by
    simp at hp
    simp [hp]
  map_target' p hp := by
    simp at hp
    simp [map_target, hp]
  left_inv' p hp := by
    simp at hp
    simp [hp]
  right_inv' p hp := by
    simp at hp
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
p : β × δ
hp : p.1 ∈ e.target ∧ p.2 ∈ e'.target
⊢ (fun p => (↑e p.1, ↑e' p.2)) ((fun p => (↑(PartialEquiv.symm e) p.1, ↑(PartialEquiv.symm e') p.2)) p) = p

Next tactic:
simp [hp]
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
⊢ PartialEquiv.symm (prod e e') = prod (PartialEquiv.symm e) (PartialEquiv.symm e')

Next tactic:
ext x
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  ext x <;> 

Proof state:
case h.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
x : β × δ
⊢ (↑(PartialEquiv.symm (prod e e')) x).1 = (↑(prod (PartialEquiv.symm e) (PartialEquiv.symm e')) x).1

Next tactic:
simp [prod_coe_symm]
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  ext x <;> 

Proof state:
case h.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
x : β × δ
⊢ (↑(PartialEquiv.symm (prod e e')) x).2 = (↑(prod (PartialEquiv.symm e) (PartialEquiv.symm e')) x).2

Next tactic:
simp [prod_coe_symm]
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  ext x <;> 

Proof state:
case hsymm.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
x : α × γ
⊢ (↑(PartialEquiv.symm (PartialEquiv.symm (prod e e'))) x).1 =
    (↑(PartialEquiv.symm (prod (PartialEquiv.symm e) (PartialEquiv.symm e'))) x).1

Next tactic:
simp [prod_coe_symm]
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  ext x <;> 

Proof state:
case hsymm.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
x : α × γ
⊢ (↑(PartialEquiv.symm (PartialEquiv.symm (prod e e'))) x).2 =
    (↑(PartialEquiv.symm (prod (PartialEquiv.symm e) (PartialEquiv.symm e'))) x).2

Next tactic:
simp [prod_coe_symm]
@[simp, mfld_simps]
theorem prod_symm (e : PartialEquiv α β) (e' : PartialEquiv γ δ) :
    (e.prod e').symm = e.symm.prod e'.symm := by
  ext x <;> 

Proof state:
case hs.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
e : PartialEquiv α β
e' : PartialEquiv γ δ
x : β × δ
⊢ x ∈ (PartialEquiv.symm (prod e e')).source ↔ x ∈ (prod (PartialEquiv.symm e) (PartialEquiv.symm e')).source

Next tactic:
simp [prod_coe_symm]
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
⊢ prod (PartialEquiv.refl α) (PartialEquiv.refl β) = PartialEquiv.refl (α × β)

Next tactic:
ext ⟨x, y⟩
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  ext ⟨x, y⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
x : α
y : β
⊢ (↑(prod (PartialEquiv.refl α) (PartialEquiv.refl β)) (x, y)).1 = (↑(PartialEquiv.refl (α × β)) (x, y)).1

Next tactic:
simp
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  ext ⟨x, y⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
x : α
y : β
⊢ (↑(prod (PartialEquiv.refl α) (PartialEquiv.refl β)) (x, y)).2 = (↑(PartialEquiv.refl (α × β)) (x, y)).2

Next tactic:
simp
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  ext ⟨x, y⟩ <;> 

Proof state:
case hsymm.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
x : α
y : β
⊢ (↑(PartialEquiv.symm (prod (PartialEquiv.refl α) (PartialEquiv.refl β))) (x, y)).1 =
    (↑(PartialEquiv.symm (PartialEquiv.refl (α × β))) (x, y)).1

Next tactic:
simp
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  ext ⟨x, y⟩ <;> 

Proof state:
case hsymm.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
x : α
y : β
⊢ (↑(PartialEquiv.symm (prod (PartialEquiv.refl α) (PartialEquiv.refl β))) (x, y)).2 =
    (↑(PartialEquiv.symm (PartialEquiv.refl (α × β))) (x, y)).2

Next tactic:
simp
@[simp, mfld_simps]
theorem refl_prod_refl :
    (PartialEquiv.refl α).prod (PartialEquiv.refl β) = PartialEquiv.refl (α × β) := by
  -- Porting note: `ext1 ⟨x, y⟩` insufficient number of binders
  ext ⟨x, y⟩ <;> 

Proof state:
case hs.h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
x : α
y : β
⊢ (x, y) ∈ (prod (PartialEquiv.refl α) (PartialEquiv.refl β)).source ↔ (x, y) ∈ (PartialEquiv.refl (α × β)).source

Next tactic:
simp
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
⊢ PartialEquiv.trans (prod e e') (prod f f') = prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f')

Next tactic:
ext ⟨x, y⟩
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : α
y : δ
⊢ (↑(PartialEquiv.trans (prod e e') (prod f f')) (x, y)).1 =
    (↑(prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f')) (x, y)).1

Next tactic:
simp [ext_iff]
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> 

Proof state:
case h.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : α
y : δ
⊢ (↑(PartialEquiv.trans (prod e e') (prod f f')) (x, y)).2 =
    (↑(prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f')) (x, y)).2

Next tactic:
simp [ext_iff]
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> 

Proof state:
case hsymm.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : γ
y : ε
⊢ (↑(PartialEquiv.symm (PartialEquiv.trans (prod e e') (prod f f'))) (x, y)).1 =
    (↑(PartialEquiv.symm (prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f'))) (x, y)).1

Next tactic:
simp [ext_iff]
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> 

Proof state:
case hsymm.mk.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : γ
y : ε
⊢ (↑(PartialEquiv.symm (PartialEquiv.trans (prod e e') (prod f f'))) (x, y)).2 =
    (↑(PartialEquiv.symm (prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f'))) (x, y)).2

Next tactic:
simp [ext_iff]
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> 

Proof state:
case hs.h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : α
y : δ
⊢ (x, y) ∈ (PartialEquiv.trans (prod e e') (prod f f')).source ↔
    (x, y) ∈ (prod (PartialEquiv.trans e f) (PartialEquiv.trans e' f')).source

Next tactic:
simp [ext_iff]
@[simp, mfld_simps]
theorem prod_trans {η : Type*} {ε : Type*} (e : PartialEquiv α β) (f : PartialEquiv β γ)
    (e' : PartialEquiv δ η) (f' : PartialEquiv η ε) :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') := by
  ext ⟨x, y⟩ <;> simp [ext_iff]; 

Proof state:
case hs.h.mk
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e✝ : PartialEquiv α β
e'✝ : PartialEquiv β γ
η : Type u_5
ε : Type u_6
e : PartialEquiv α β
f : PartialEquiv β γ
e' : PartialEquiv δ η
f' : PartialEquiv η ε
x : α
y : δ
⊢ (x ∈ e.source ∧ y ∈ e'.source) ∧ ↑e x ∈ f.source ∧ ↑e' y ∈ f'.source ↔
    (x ∈ e.source ∧ ↑e x ∈ f.source) ∧ y ∈ e'.source ∧ ↑e' y ∈ f'.source

Next tactic:
tauto
@[simp, mfld_simps]
theorem pi_refl : (PartialEquiv.pi fun i ↦ PartialEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
⊢ (PartialEquiv.pi fun i => PartialEquiv.refl (αi i)) = PartialEquiv.refl ((i : ι) → αi i)

Next tactic:
ext
@[simp, mfld_simps]
theorem pi_refl : (PartialEquiv.pi fun i ↦ PartialEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
  ext <;> 

Proof state:
case h.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
x✝¹ : (i : ι) → αi i
x✝ : ι
⊢ ↑(PartialEquiv.pi fun i => PartialEquiv.refl (αi i)) x✝¹ x✝ = ↑(PartialEquiv.refl ((i : ι) → αi i)) x✝¹ x✝

Next tactic:
simp
@[simp, mfld_simps]
theorem pi_refl : (PartialEquiv.pi fun i ↦ PartialEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
  ext <;> 

Proof state:
case hsymm.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
x✝¹ : (i : ι) → αi i
x✝ : ι
⊢ ↑(PartialEquiv.symm (PartialEquiv.pi fun i => PartialEquiv.refl (αi i))) x✝¹ x✝ =
    ↑(PartialEquiv.symm (PartialEquiv.refl ((i : ι) → αi i))) x✝¹ x✝

Next tactic:
simp
@[simp, mfld_simps]
theorem pi_refl : (PartialEquiv.pi fun i ↦ PartialEquiv.refl (αi i)) = .refl (∀ i, αi i) := by
  ext <;> 

Proof state:
case hs.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
x✝ : (i : ι) → αi i
⊢ x✝ ∈ (PartialEquiv.pi fun i => PartialEquiv.refl (αi i)).source ↔ x✝ ∈ (PartialEquiv.refl ((i : ι) → αi i)).source

Next tactic:
simp
@[simp, mfld_simps]
theorem pi_trans (ei : ∀ i, PartialEquiv (αi i) (βi i)) (ei' : ∀ i, PartialEquiv (βi i) (γi i)) :
    (PartialEquiv.pi ei).trans (PartialEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
ei : (i : ι) → PartialEquiv (αi i) (βi i)
ei' : (i : ι) → PartialEquiv (βi i) (γi i)
⊢ PartialEquiv.trans (PartialEquiv.pi ei) (PartialEquiv.pi ei') =
    PartialEquiv.pi fun i => PartialEquiv.trans (ei i) (ei' i)

Next tactic:
ext
@[simp, mfld_simps]
theorem pi_trans (ei : ∀ i, PartialEquiv (αi i) (βi i)) (ei' : ∀ i, PartialEquiv (βi i) (γi i)) :
    (PartialEquiv.pi ei).trans (PartialEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
  ext <;> 

Proof state:
case h.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
ei : (i : ι) → PartialEquiv (αi i) (βi i)
ei' : (i : ι) → PartialEquiv (βi i) (γi i)
x✝¹ : (i : ι) → αi i
x✝ : ι
⊢ ↑(PartialEquiv.trans (PartialEquiv.pi ei) (PartialEquiv.pi ei')) x✝¹ x✝ =
    ↑(PartialEquiv.pi fun i => PartialEquiv.trans (ei i) (ei' i)) x✝¹ x✝

Next tactic:
simp [forall_and]
@[simp, mfld_simps]
theorem pi_trans (ei : ∀ i, PartialEquiv (αi i) (βi i)) (ei' : ∀ i, PartialEquiv (βi i) (γi i)) :
    (PartialEquiv.pi ei).trans (PartialEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
  ext <;> 

Proof state:
case hsymm.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
ei : (i : ι) → PartialEquiv (αi i) (βi i)
ei' : (i : ι) → PartialEquiv (βi i) (γi i)
x✝¹ : (i : ι) → γi i
x✝ : ι
⊢ ↑(PartialEquiv.symm (PartialEquiv.trans (PartialEquiv.pi ei) (PartialEquiv.pi ei'))) x✝¹ x✝ =
    ↑(PartialEquiv.symm (PartialEquiv.pi fun i => PartialEquiv.trans (ei i) (ei' i))) x✝¹ x✝

Next tactic:
simp [forall_and]
@[simp, mfld_simps]
theorem pi_trans (ei : ∀ i, PartialEquiv (αi i) (βi i)) (ei' : ∀ i, PartialEquiv (βi i) (γi i)) :
    (PartialEquiv.pi ei).trans (PartialEquiv.pi ei') = .pi fun i ↦ (ei i).trans (ei' i) := by
  ext <;> 

Proof state:
case hs.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
ι : Type u_5
αi : ι → Type u_6
βi : ι → Type u_7
γi : ι → Type u_8
ei : (i : ι) → PartialEquiv (αi i) (βi i)
ei' : (i : ι) → PartialEquiv (βi i) (γi i)
x✝ : (i : ι) → αi i
⊢ x✝ ∈ (PartialEquiv.trans (PartialEquiv.pi ei) (PartialEquiv.pi ei')).source ↔
    x✝ ∈ (PartialEquiv.pi fun i => PartialEquiv.trans (ei i) (ei' i)).source

Next tactic:
simp [forall_and]
@[simp, mfld_simps]
theorem trans_toPartialEquiv :
    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv :=
  PartialEquiv.ext (fun x => rfl) (fun x => rfl)
    (by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : α ≃ β
e' : β ≃ γ
⊢ (toPartialEquiv (e.trans e')).source = (PartialEquiv.trans (toPartialEquiv e) (toPartialEquiv e')).source

Next tactic:
simp [PartialEquiv.trans_source, Equiv.toPartialEquiv]
instance OrderDual.archimedean [OrderedAddCommGroup α] [Archimedean α] : Archimedean αᵒᵈ :=
  ⟨fun x y hy =>
    let ⟨n, hn⟩ := Archimedean.arch (-ofDual x) (neg_pos.2 hy)
    ⟨n, by 

Proof state:
α : Type u_1
inst✝¹ : OrderedAddCommGroup α
inst✝ : Archimedean α
x y : αᵒᵈ
hy : 0 < y
n : ℕ
hn : -ofDual x ≤ n • -y
⊢ x ≤ n • y

Next tactic:
rwa [neg_nsmul, neg_le_neg_iff] at hn
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  

Proof state:
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a

Next tactic:
let s : Set ℤ := { n : ℤ | n • a ≤ g }
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  

Proof state:
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a

Next tactic:
obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  

Proof state:
case intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k : ℕ
hk : -g ≤ k • a
⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a

Next tactic:
have h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  have h_ne : s.Nonempty := ⟨-k, by 

Proof state:
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k : ℕ
hk : -g ≤ k • a
⊢ -↑k ∈ s

Next tactic:
simpa using neg_le_neg hk
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  have h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩
  

Proof state:
case intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k : ℕ
hk : -g ≤ k • a
h_ne : Set.Nonempty s
⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a

Next tactic:
obtain ⟨k, hk⟩ := Archimedean.arch g ha
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  have h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩
  obtain ⟨k, hk⟩ := Archimedean.arch g ha
  

Proof state:
case intro.intro
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k✝ : ℕ
hk✝ : -g ≤ k✝ • a
h_ne : Set.Nonempty s
k : ℕ
hk : g ≤ k • a
⊢ ∃! k, k • a ≤ g ∧ g < (k + 1) • a

Next tactic:
have h_bdd : ∀ n ∈ s, n ≤ (k : ℤ) := by
    intro n hn
    apply (zsmul_le_zsmul_iff ha).mp
    rw [← coe_nat_zsmul] at hk
    exact le_trans hn hk
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  have h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩
  obtain ⟨k, hk⟩ := Archimedean.arch g ha
  have h_bdd : ∀ n ∈ s, n ≤ (k : ℤ) := by
    

Proof state:
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k✝ : ℕ
hk✝ : -g ≤ k✝ • a
h_ne : Set.Nonempty s
k : ℕ
hk : g ≤ k • a
⊢ ∀ n ∈ s, n ≤ ↑k

Next tactic:
intro n hn
/-- An archimedean decidable linearly ordered `AddCommGroup` has a version of the floor: for
`a > 0`, any `g` in the group lies between some two consecutive multiples of `a`. -/
theorem existsUnique_zsmul_near_of_pos {a : α} (ha : 0 < a) (g : α) :
    ∃! k : ℤ, k • a ≤ g ∧ g < (k + 1) • a := by
  let s : Set ℤ := { n : ℤ | n • a ≤ g }
  obtain ⟨k, hk : -g ≤ k • a⟩ := Archimedean.arch (-g) ha
  have h_ne : s.Nonempty := ⟨-k, by simpa using neg_le_neg hk⟩
  obtain ⟨k, hk⟩ := Archimedean.arch g ha
  have h_bdd : ∀ n ∈ s, n ≤ (k : ℤ) := by
    intro n hn
    

Proof state:
α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
g : α
s : Set ℤ := {n | n • a ≤ g}
k✝ : ℕ
hk✝ : -g ≤ k✝ • a
h_ne : Set.Nonempty s
k : ℕ
hk : g ≤ k • a
n : ℤ
hn : n ∈ s
⊢ n ≤ ↑k

Next tactic:
apply (zsmul_le_zsmul_iff ha).mp