l3lab/ntp-mathlib huggingface dataset:
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this✝ : (val ∘ fun x => x.1 * x.2) = (fun x => x.1 * x.2) ∘ fun x => (↑x.1, ↑x.2)
this : ContMDiff (ModelWithCorners.prod 𝓘(𝕜, R) 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ⊤ fun x => (↑x.1, ↑x.2)
⊢ ContMDiff (ModelWithCorners.prod 𝓘(𝕜, R) 𝓘(𝕜, R)) 𝓘(𝕜, R) ⊤ ((fun x => x.1 * x.2) ∘ fun x => (↑x.1, ↑x.2))

Next tactic:
refine ContMDiff.comp ?_ this
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this✝ : (val ∘ fun x => x.1 * x.2) = (fun x => x.1 * x.2) ∘ fun x => (↑x.1, ↑x.2)
this : ContMDiff (ModelWithCorners.prod 𝓘(𝕜, R) 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ⊤ fun x => (↑x.1, ↑x.2)
⊢ ContMDiff 𝓘(𝕜, R × R) 𝓘(𝕜, R) ⊤ fun x => x.1 * x.2

Next tactic:
rw [contMDiff_iff_contDiff]
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this✝ : (val ∘ fun x => x.1 * x.2) = (fun x => x.1 * x.2) ∘ fun x => (↑x.1, ↑x.2)
this : ContMDiff (ModelWithCorners.prod 𝓘(𝕜, R) 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ⊤ fun x => (↑x.1, ↑x.2)
⊢ ContDiff 𝕜 ⊤ fun x => x.1 * x.2

Next tactic:
exact contDiff_mul
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
⊢ Smooth 𝓘(𝕜, R) 𝓘(𝕜, R) fun a => a⁻¹

Next tactic:
apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
⊢ ContMDiff 𝓘(𝕜, R) 𝓘(𝕜, R) ⊤ (val ∘ fun a => a⁻¹)

Next tactic:
have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; simp
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by 

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
⊢ (val ∘ fun x => x⁻¹) = Ring.inverse ∘ val

Next tactic:
ext
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; 

Proof state:
case h
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
x✝ : Rˣ
⊢ (val ∘ fun x => x⁻¹) x✝ = (Ring.inverse ∘ val) x✝

Next tactic:
simp
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; simp
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this : (val ∘ fun x => x⁻¹) = Ring.inverse ∘ val
⊢ ContMDiff 𝓘(𝕜, R) 𝓘(𝕜, R) ⊤ (val ∘ fun a => a⁻¹)

Next tactic:
rw [this, ContMDiff]
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; simp
    rw [this, ContMDiff]
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this : (val ∘ fun x => x⁻¹) = Ring.inverse ∘ val
⊢ ∀ (x : Rˣ), ContMDiffAt 𝓘(𝕜, R) 𝓘(𝕜, R) ⊤ (Ring.inverse ∘ val) x

Next tactic:
refine fun x => ContMDiffAt.comp x ?_ (contMDiff_val x)
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; simp
    rw [this, ContMDiff]
    refine fun x => ContMDiffAt.comp x ?_ (contMDiff_val x)
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this : (val ∘ fun x => x⁻¹) = Ring.inverse ∘ val
x : Rˣ
⊢ ContMDiffAt 𝓘(𝕜, R) 𝓘(𝕜, R) ⊤ Ring.inverse ↑x

Next tactic:
rw [contMDiffAt_iff_contDiffAt]
/-- The units of a complete normed ring form a Lie group. -/
instance : LieGroup 𝓘(𝕜, R) Rˣ where
  smooth_mul := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ × Rˣ => x.1 * x.2) =
      (fun x : R × R => x.1 * x.2) ∘ (fun x : Rˣ × Rˣ => (x.1, x.2)) := by ext; simp
    rw [this]
    have : ContMDiff (𝓘(𝕜, R).prod 𝓘(𝕜, R)) 𝓘(𝕜, R × R) ∞
      (fun x : Rˣ × Rˣ => ((x.1 : R), (x.2 : R))) :=
      (contMDiff_val.comp contMDiff_fst).prod_mk_space (contMDiff_val.comp contMDiff_snd)
    refine ContMDiff.comp ?_ this
    rw [contMDiff_iff_contDiff]
    exact contDiff_mul
  smooth_inv := by
    apply ContMDiff.of_comp_openEmbedding Units.openEmbedding_val
    have : (val : Rˣ → R) ∘ (fun x : Rˣ => x⁻¹) = Ring.inverse ∘ val := by ext; simp
    rw [this, ContMDiff]
    refine fun x => ContMDiffAt.comp x ?_ (contMDiff_val x)
    rw [contMDiffAt_iff_contDiffAt]
    

Proof state:
R : Type u_1
inst✝³ : NormedRing R
inst✝² : CompleteSpace R
𝕜 : Type u_2
inst✝¹ : NontriviallyNormedField 𝕜
inst✝ : NormedAlgebra 𝕜 R
this : (val ∘ fun x => x⁻¹) = Ring.inverse ∘ val
x : Rˣ
⊢ ContDiffAt 𝕜 ⊤ Ring.inverse ↑x

Next tactic:
exact contDiffAt_ring_inverse _ _
/-- The order on `Finsupp`s over a partial order embeds into the order on functions -/
def orderEmbeddingToFun : (ι →₀ α) ↪o (ι → α) where
  toFun f := f
  inj' f g h :=
    Finsupp.ext fun i => by
      

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : Zero α
inst✝ : LE α
f✝ g✝ f g : ι →₀ α
h : (fun f => ⇑f) f = (fun f => ⇑f) g
i : ι
⊢ f i = g i

Next tactic:
dsimp at h
/-- The order on `Finsupp`s over a partial order embeds into the order on functions -/
def orderEmbeddingToFun : (ι →₀ α) ↪o (ι → α) where
  toFun f := f
  inj' f g h :=
    Finsupp.ext fun i => by
      dsimp at h
      

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : Zero α
inst✝ : LE α
f✝ g✝ f g : ι →₀ α
h : ⇑f = ⇑g
i : ι
⊢ f i = g i

Next tactic:
rw [h]
theorem support_inf_union_support_sup : (f ⊓ g).support ∪ (f ⊔ g).support = f.support ∪ g.support :=
  coe_injective <| compl_injective <| by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Zero α
inst✝¹ : DecidableEq ι
inst✝ : Lattice α
f g : ι →₀ α
⊢ (↑((f ⊓ g).support ∪ (f ⊔ g).support))ᶜ = (↑(f.support ∪ g.support))ᶜ

Next tactic:
ext
theorem support_inf_union_support_sup : (f ⊓ g).support ∪ (f ⊔ g).support = f.support ∪ g.support :=
  coe_injective <| compl_injective <| by ext; 

Proof state:
case h
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : Zero α
inst✝¹ : DecidableEq ι
inst✝ : Lattice α
f g : ι →₀ α
x✝ : ι
⊢ x✝ ∈ (↑((f ⊓ g).support ∪ (f ⊔ g).support))ᶜ ↔ x✝ ∈ (↑(f.support ∪ g.support))ᶜ

Next tactic:
simp [inf_eq_and_sup_eq_iff]
instance orderBot : OrderBot (ι →₀ α) where
  bot := 0
  bot_le := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f g : ι →₀ α
⊢ ∀ (a : ι →₀ α), ⊥ ≤ a

Next tactic:
simp only [le_def, coe_zero, Pi.zero_apply, imp_true_iff, zero_le]
@[simp]
theorem add_eq_zero_iff (f g : ι →₀ α) : f + g = 0 ↔ f = 0 ∧ g = 0 := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ f g : ι →₀ α
⊢ f + g = 0 ↔ f = 0 ∧ g = 0

Next tactic:
simp [FunLike.ext_iff, forall_and]
theorem le_iff' (f g : ι →₀ α) {s : Finset ι} (hf : f.support ⊆ s) : f ≤ g ↔ ∀ i ∈ s, f i ≤ g i :=
  ⟨fun h s _hs => h s, fun h s => by
    

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ f g : ι →₀ α
s✝ : Finset ι
hf : f.support ⊆ s✝
h : ∀ i ∈ s✝, f i ≤ g i
s : ι
⊢ f s ≤ g s

Next tactic:
classical exact
        if H : s ∈ f.support then h s (hf H) else (not_mem_support_iff.1 H).symm ▸ zero_le (g s)
theorem le_iff' (f g : ι →₀ α) {s : Finset ι} (hf : f.support ⊆ s) : f ≤ g ↔ ∀ i ∈ s, f i ≤ g i :=
  ⟨fun h s _hs => h s, fun h s => by
    classical 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ f g : ι →₀ α
s✝ : Finset ι
hf : f.support ⊆ s✝
h : ∀ i ∈ s✝, f i ≤ g i
s : ι
⊢ f s ≤ g s

Next tactic:
exact
        if H : s ∈ f.support then h s (hf H) else (not_mem_support_iff.1 H).symm ▸ zero_le (g s)
lemma support_monotone : Monotone (support (α := ι) (M := α)) :=
  fun f g h a ha ↦ by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ f g : ι →₀ α
h : f ≤ g
a : ι
ha : a ∈ f.support
⊢ a ∈ g.support

Next tactic:
rw [mem_support_iff, ← pos_iff_ne_zero] at ha ⊢
lemma support_monotone : Monotone (support (α := ι) (M := α)) :=
  fun f g h a ha ↦ by rw [mem_support_iff, ← pos_iff_ne_zero] at ha ⊢; 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ f g : ι →₀ α
h : f ≤ g
a : ι
ha : 0 < f a
⊢ 0 < g a

Next tactic:
exact ha.trans_le (h _)
@[simp]
theorem single_le_iff {i : ι} {x : α} {f : ι →₀ α} : single i x ≤ f ↔ x ≤ f i :=
  (le_iff' _ _ support_single_subset).trans <| by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyOrderedAddCommMonoid α
f✝ g : ι →₀ α
i : ι
x : α
f : ι →₀ α
⊢ (∀ i_1 ∈ {i}, (fun₀ | i => x) i_1 ≤ f i_1) ↔ x ≤ f i

Next tactic:
simp
@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
⊢ (fun₀ | i => a - b) = (fun₀ | i => a) - fun₀ | i => b

Next tactic:
ext j
@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b := by
  ext j
  

Proof state:
case h
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
j : ι
⊢ (fun₀ | i => a - b) j = ((fun₀ | i => a) - fun₀ | i => b) j

Next tactic:
obtain rfl | h := eq_or_ne i j
@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b := by
  ext j
  obtain rfl | h := eq_or_ne i j
  · 

Proof state:
case h.inl
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
⊢ (fun₀ | i => a - b) i = ((fun₀ | i => a) - fun₀ | i => b) i

Next tactic:
rw [tsub_apply, single_eq_same, single_eq_same, single_eq_same]
@[simp]
theorem single_tsub : single i (a - b) = single i a - single i b := by
  ext j
  obtain rfl | h := eq_or_ne i j
  · rw [tsub_apply, single_eq_same, single_eq_same, single_eq_same]
  · 

Proof state:
case h.inr
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
j : ι
h : i ≠ j
⊢ (fun₀ | i => a - b) j = ((fun₀ | i => a) - fun₀ | i => b) j

Next tactic:
rw [tsub_apply, single_eq_of_ne h, single_eq_of_ne h, single_eq_of_ne h, tsub_self]
theorem support_tsub {f1 f2 : ι →₀ α} : (f1 - f2).support ⊆ f1.support := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
f1 f2 : ι →₀ α
⊢ (f1 - f2).support ⊆ f1.support

Next tactic:
simp (config := { contextual := true }) only [subset_iff, tsub_eq_zero_iff_le, mem_support_iff,
    Ne.def, coe_tsub, Pi.sub_apply, not_imp_not, zero_le, imp_true_iff]
theorem subset_support_tsub [DecidableEq ι] {f1 f2 : ι →₀ α} :
    f1.support \ f2.support ⊆ (f1 - f2).support := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : CanonicallyOrderedAddCommMonoid α
f✝ g✝ : ι →₀ α
inst✝² : Sub α
inst✝¹ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
inst✝ : DecidableEq ι
f1 f2 : ι →₀ α
⊢ f1.support \ f2.support ⊆ (f1 - f2).support

Next tactic:
simp (config := { contextual := true }) [subset_iff]
@[simp]
theorem support_inf [DecidableEq ι] (f g : ι →₀ α) : (f ⊓ g).support = f.support ∩ g.support := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
⊢ (f ⊓ g).support = f.support ∩ g.support

Next tactic:
ext
@[simp]
theorem support_inf [DecidableEq ι] (f g : ι →₀ α) : (f ⊓ g).support = f.support ∩ g.support := by
  ext
  

Proof state:
case a
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
a✝ : ι
⊢ a✝ ∈ (f ⊓ g).support ↔ a✝ ∈ f.support ∩ g.support

Next tactic:
simp only [inf_apply, mem_support_iff, Ne.def, Finset.mem_union, Finset.mem_filter,
    Finset.mem_inter]
@[simp]
theorem support_inf [DecidableEq ι] (f g : ι →₀ α) : (f ⊓ g).support = f.support ∩ g.support := by
  ext
  simp only [inf_apply, mem_support_iff, Ne.def, Finset.mem_union, Finset.mem_filter,
    Finset.mem_inter]
  

Proof state:
case a
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
a✝ : ι
⊢ ¬f a✝ ⊓ g a✝ = 0 ↔ ¬f a✝ = 0 ∧ ¬g a✝ = 0

Next tactic:
simp only [inf_eq_min, ← nonpos_iff_eq_zero, min_le_iff, not_or]
@[simp]
theorem support_sup [DecidableEq ι] (f g : ι →₀ α) : (f ⊔ g).support = f.support ∪ g.support := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
⊢ (f ⊔ g).support = f.support ∪ g.support

Next tactic:
ext
@[simp]
theorem support_sup [DecidableEq ι] (f g : ι →₀ α) : (f ⊔ g).support = f.support ∪ g.support := by
  ext
  

Proof state:
case a
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
a✝ : ι
⊢ a✝ ∈ (f ⊔ g).support ↔ a✝ ∈ f.support ∪ g.support

Next tactic:
simp only [Finset.mem_union, mem_support_iff, sup_apply, Ne.def, ← bot_eq_zero]
@[simp]
theorem support_sup [DecidableEq ι] (f g : ι →₀ α) : (f ⊔ g).support = f.support ∪ g.support := by
  ext
  simp only [Finset.mem_union, mem_support_iff, sup_apply, Ne.def, ← bot_eq_zero]
  

Proof state:
case a
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CanonicallyLinearOrderedAddCommMonoid α
inst✝ : DecidableEq ι
f g : ι →₀ α
a✝ : ι
⊢ ¬f a✝ ⊔ g a✝ = ⊥ ↔ ¬f a✝ = ⊥ ∨ ¬g a✝ = ⊥

Next tactic:
rw [_root_.sup_eq_bot_iff, not_and_or]
nonrec theorem disjoint_iff {f g : ι →₀ α} : Disjoint f g ↔ Disjoint f.support g.support := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyLinearOrderedAddCommMonoid α
f g : ι →₀ α
⊢ Disjoint f g ↔ Disjoint f.support g.support

Next tactic:
classical
    rw [disjoint_iff, disjoint_iff, Finsupp.bot_eq_zero, ← Finsupp.support_eq_empty,
      Finsupp.support_inf]
    rfl
nonrec theorem disjoint_iff {f g : ι →₀ α} : Disjoint f g ↔ Disjoint f.support g.support := by
  classical
    

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyLinearOrderedAddCommMonoid α
f g : ι →₀ α
⊢ Disjoint f g ↔ Disjoint f.support g.support

Next tactic:
rw [disjoint_iff, disjoint_iff, Finsupp.bot_eq_zero, ← Finsupp.support_eq_empty,
      Finsupp.support_inf]
nonrec theorem disjoint_iff {f g : ι →₀ α} : Disjoint f g ↔ Disjoint f.support g.support := by
  classical
    rw [disjoint_iff, disjoint_iff, Finsupp.bot_eq_zero, ← Finsupp.support_eq_empty,
      Finsupp.support_inf]
    

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CanonicallyLinearOrderedAddCommMonoid α
f g : ι →₀ α
⊢ f.support ∩ g.support = ∅ ↔ f.support ⊓ g.support = ⊥

Next tactic:
rfl
lemma uniformInducing_iff' {f : α → β} :
    UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
⊢ UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α

Next tactic:
rw [uniformInducing_iff, UniformContinuous, tendsto_iff_comap, le_antisymm_iff, and_comm]
lemma uniformInducing_iff' {f : α → β} :
    UniformInducing f ↔ UniformContinuous f ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α := by
  rw [uniformInducing_iff, UniformContinuous, tendsto_iff_comap, le_antisymm_iff, and_comm]; 

Proof state:
α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
⊢ 𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤 β) ∧ comap (fun x => (f x.1, f x.2)) (𝓤 β) ≤ 𝓤 α ↔
    𝓤 α ≤ comap (fun x => (f x.1, f x.2)) (𝓤 β) ∧ comap (Prod.map f f) (𝓤 β) ≤ 𝓤 α

Next tactic:
rfl
protected lemma Filter.HasBasis.uniformInducing_iff {ι ι'} {p : ι → Prop} {p' : ι' → Prop} {s s'}
    (h : (𝓤 α).HasBasis p s) (h' : (𝓤 β).HasBasis p' s') {f : α → β} :
    UniformInducing f ↔
      (∀ i, p' i → ∃ j, p j ∧ ∀ x y, (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
        (∀ j, p j → ∃ i, p' i ∧ ∀ x y, (f x, f y) ∈ s' i → (x, y) ∈ s j) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
ι : Sort u_1
ι' : Sort u_2
p : ι → Prop
p' : ι' → Prop
s : ι → Set (α × α)
s' : ι' → Set (β × β)
h : HasBasis (𝓤 α) p s
h' : HasBasis (𝓤 β) p' s'
f : α → β
⊢ UniformInducing f ↔
    (∀ (i : ι'), p' i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ s' i) ∧
      ∀ (j : ι), p j → ∃ i, p' i ∧ ∀ (x y : α), (f x, f y) ∈ s' i → (x, y) ∈ s j

Next tactic:
simp [uniformInducing_iff', h.uniformContinuous_iff h', (h'.comap _).le_basis_iff h, subset_def]
theorem UniformInducing.mk' {f : α → β}
    (h : ∀ s, s ∈ 𝓤 α ↔ ∃ t ∈ 𝓤 β, ∀ x y : α, (f x, f y) ∈ t → (x, y) ∈ s) : UniformInducing f :=
  ⟨by 

Proof state:
α : Type u
β : Type v
γ : Type w
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
f : α → β
h : ∀ (s : Set (α × α)), s ∈ 𝓤 α ↔ ∃ t ∈ 𝓤 β, ∀ (x y : α), (f x, f y) ∈ t → (x, y) ∈ s
⊢ comap (fun x => (f x.1, f x.2)) (𝓤 β) = 𝓤 α

Next tactic:
simp [eq_comm, Filter.ext_iff, subset_def, h]