l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem uIcc_of_le (h : a ≤ b) : [[a, b]] = Icc a b := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h : a ≤ b
⊢ [[a, b]] = Icc a b

Next tactic:
rw [uIcc, inf_eq_left.2 h, sup_eq_right.2 h]
@[simp]
theorem uIcc_of_ge (h : b ≤ a) : [[a, b]] = Icc b a := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h : b ≤ a
⊢ [[a, b]] = Icc b a

Next tactic:
rw [uIcc, inf_eq_right.2 h, sup_eq_left.2 h]
theorem uIcc_comm (a b : α) : [[a, b]] = [[b, a]] := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b✝ b₁ b₂ c x a b : α
⊢ [[a, b]] = [[b, a]]

Next tactic:
rw [uIcc, uIcc, inf_comm, sup_comm]
theorem uIcc_self : [[a, a]] = {a} := by 

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ [[a, a]] = {a}

Next tactic:
simp [uIcc]
theorem uIcc_subset_uIcc (h₁ : a₁ ∈ [[a₂, b₂]]) (h₂ : b₁ ∈ [[a₂, b₂]]) :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h₁ : a₁ ∈ [[a₂, b₂]]
h₂ : b₁ ∈ [[a₂, b₂]]
⊢ [[a₁, b₁]] ⊆ [[a₂, b₂]]

Next tactic:
rw [mem_uIcc] at h₁ h₂
theorem uIcc_subset_uIcc (h₁ : a₁ ∈ [[a₂, b₂]]) (h₂ : b₁ ∈ [[a₂, b₂]]) :
    [[a₁, b₁]] ⊆ [[a₂, b₂]] := by
  rw [mem_uIcc] at h₁ h₂
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
h₁ : a₂ ⊓ b₂ ≤ a₁ ∧ a₁ ≤ a₂ ⊔ b₂
h₂ : a₂ ⊓ b₂ ≤ b₁ ∧ b₁ ≤ a₂ ⊔ b₂
⊢ [[a₁, b₁]] ⊆ [[a₂, b₂]]

Next tactic:
exact Icc_subset_Icc (_root_.le_inf h₁.1 h₂.1) (_root_.sup_le h₁.2 h₂.2)
theorem uIcc_subset_Icc (ha : a₁ ∈ Icc a₂ b₂) (hb : b₁ ∈ Icc a₂ b₂) : [[a₁, b₁]] ⊆ Icc a₂ b₂ := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
ha : a₁ ∈ Icc a₂ b₂
hb : b₁ ∈ Icc a₂ b₂
⊢ [[a₁, b₁]] ⊆ Icc a₂ b₂

Next tactic:
rw [mem_Icc] at ha hb
theorem uIcc_subset_Icc (ha : a₁ ∈ Icc a₂ b₂) (hb : b₁ ∈ Icc a₂ b₂) : [[a₁, b₁]] ⊆ Icc a₂ b₂ := by
  rw [mem_Icc] at ha hb
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : Lattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
ha : a₂ ≤ a₁ ∧ a₁ ≤ b₂
hb : a₂ ≤ b₁ ∧ b₁ ≤ b₂
⊢ [[a₁, b₁]] ⊆ Icc a₂ b₂

Next tactic:
exact Icc_subset_Icc (_root_.le_inf ha.1 hb.1) (_root_.sup_le ha.2 hb.2)
theorem eq_of_mem_uIcc_of_mem_uIcc : a ∈ [[b, c]] → b ∈ [[a, c]] → a = b := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a ∈ [[b, c]] → b ∈ [[a, c]] → a = b

Next tactic:
simp_rw [mem_uIcc]
theorem eq_of_mem_uIcc_of_mem_uIcc : a ∈ [[b, c]] → b ∈ [[a, c]] → a = b := by
  simp_rw [mem_uIcc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ b ⊓ c ≤ a ∧ a ≤ b ⊔ c → a ⊓ c ≤ b ∧ b ≤ a ⊔ c → a = b

Next tactic:
exact Set.eq_of_mem_uIcc_of_mem_uIcc
theorem eq_of_mem_uIcc_of_mem_uIcc' : b ∈ [[a, c]] → c ∈ [[a, b]] → b = c := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ b ∈ [[a, c]] → c ∈ [[a, b]] → b = c

Next tactic:
simp_rw [mem_uIcc]
theorem eq_of_mem_uIcc_of_mem_uIcc' : b ∈ [[a, c]] → c ∈ [[a, b]] → b = c := by
  simp_rw [mem_uIcc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a ⊓ c ≤ b ∧ b ≤ a ⊔ c → a ⊓ b ≤ c ∧ c ≤ a ⊔ b → b = c

Next tactic:
exact Set.eq_of_mem_uIcc_of_mem_uIcc'
theorem uIcc_injective_right (a : α) : Injective fun b => [[b, a]] := fun b c h => by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b✝ b₁ b₂ c✝ x a b c : α
h : (fun b => [[b, a]]) b = (fun b => [[b, a]]) c
⊢ b = c

Next tactic:
rw [ext_iff] at h
theorem uIcc_injective_right (a : α) : Injective fun b => [[b, a]] := fun b c h => by
  rw [ext_iff] at h
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b✝ b₁ b₂ c✝ x a b c : α
h : ∀ (a_1 : α), a_1 ∈ (fun b => [[b, a]]) b ↔ a_1 ∈ (fun b => [[b, a]]) c
⊢ b = c

Next tactic:
exact eq_of_mem_uIcc_of_mem_uIcc ((h _).1 left_mem_uIcc) ((h _).2 left_mem_uIcc)
theorem uIcc_injective_left (a : α) : Injective (uIcc a) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : DistribLattice α
inst✝ : LocallyFiniteOrder α
a✝ a₁ a₂ b b₁ b₂ c x a : α
⊢ Injective (uIcc a)

Next tactic:
simpa only [uIcc_comm] using uIcc_injective_right a
theorem uIcc_eq_union : [[a, b]] = Icc a b ∪ Icc b a :=
  coe_injective <| by
    

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ ↑[[a, b]] = ↑(Icc a b ∪ Icc b a)

Next tactic:
push_cast
theorem uIcc_eq_union : [[a, b]] = Icc a b ∪ Icc b a :=
  coe_injective <| by
    push_cast
    

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Set.uIcc a b = Set.Icc a b ∪ Set.Icc b a

Next tactic:
exact Set.uIcc_eq_union
theorem mem_uIcc' : a ∈ [[b, c]] ↔ b ≤ a ∧ a ≤ c ∨ c ≤ a ∧ a ≤ b := by 

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a ∈ [[b, c]] ↔ b ≤ a ∧ a ≤ c ∨ c ≤ a ∧ a ≤ b

Next tactic:
simp [uIcc_eq_union]
theorem not_mem_uIcc_of_lt : c < a → c < b → c ∉ [[a, b]] := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ c < a → c < b → c ∉ [[a, b]]

Next tactic:
rw [mem_uIcc]
theorem not_mem_uIcc_of_lt : c < a → c < b → c ∉ [[a, b]] := by
  rw [mem_uIcc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ c < a → c < b → ¬(a ⊓ b ≤ c ∧ c ≤ a ⊔ b)

Next tactic:
exact Set.not_mem_uIcc_of_lt
theorem not_mem_uIcc_of_gt : a < c → b < c → c ∉ [[a, b]] := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a < c → b < c → c ∉ [[a, b]]

Next tactic:
rw [mem_uIcc]
theorem not_mem_uIcc_of_gt : a < c → b < c → c ∉ [[a, b]] := by
  rw [mem_uIcc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a < c → b < c → ¬(a ⊓ b ≤ c ∧ c ≤ a ⊔ b)

Next tactic:
exact Set.not_mem_uIcc_of_gt
/-- A sort of triangle inequality. -/
theorem uIcc_subset_uIcc_union_uIcc : [[a, c]] ⊆ [[a, b]] ∪ [[b, c]] :=
  coe_subset.1 <| by
    

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ ↑[[a, c]] ⊆ ↑([[a, b]] ∪ [[b, c]])

Next tactic:
push_cast
/-- A sort of triangle inequality. -/
theorem uIcc_subset_uIcc_union_uIcc : [[a, c]] ⊆ [[a, b]] ∪ [[b, c]] :=
  coe_subset.1 <| by
    push_cast
    

Proof state:
ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Set.uIcc a c ⊆ Set.uIcc a b ∪ Set.uIcc b c

Next tactic:
exact Set.uIcc_subset_uIcc_union_uIcc
@[simp]
theorem map_add_left_Icc (a b c : α) :
    (Icc a b).map (addLeftEmbedding c) = Icc (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addLeftEmbedding c) (Icc a b) = Icc (c + a) (c + b)

Next tactic:
rw [← coe_inj, coe_map, coe_Icc, coe_Icc]
@[simp]
theorem map_add_left_Icc (a b c : α) :
    (Icc a b).map (addLeftEmbedding c) = Icc (c + a) (c + b) := by
  rw [← coe_inj, coe_map, coe_Icc, coe_Icc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addLeftEmbedding c) '' Set.Icc a b = Set.Icc (c + a) (c + b)

Next tactic:
exact Set.image_const_add_Icc _ _ _
@[simp]
theorem map_add_right_Icc (a b c : α) :
    (Icc a b).map (addRightEmbedding c) = Icc (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addRightEmbedding c) (Icc a b) = Icc (a + c) (b + c)

Next tactic:
rw [← coe_inj, coe_map, coe_Icc, coe_Icc]
@[simp]
theorem map_add_right_Icc (a b c : α) :
    (Icc a b).map (addRightEmbedding c) = Icc (a + c) (b + c) := by
  rw [← coe_inj, coe_map, coe_Icc, coe_Icc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Icc a b = Set.Icc (a + c) (b + c)

Next tactic:
exact Set.image_add_const_Icc _ _ _
@[simp]
theorem map_add_left_Ico (a b c : α) :
    (Ico a b).map (addLeftEmbedding c) = Ico (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addLeftEmbedding c) (Ico a b) = Ico (c + a) (c + b)

Next tactic:
rw [← coe_inj, coe_map, coe_Ico, coe_Ico]
@[simp]
theorem map_add_left_Ico (a b c : α) :
    (Ico a b).map (addLeftEmbedding c) = Ico (c + a) (c + b) := by
  rw [← coe_inj, coe_map, coe_Ico, coe_Ico]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addLeftEmbedding c) '' Set.Ico a b = Set.Ico (c + a) (c + b)

Next tactic:
exact Set.image_const_add_Ico _ _ _
@[simp]
theorem map_add_right_Ico (a b c : α) :
    (Ico a b).map (addRightEmbedding c) = Ico (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addRightEmbedding c) (Ico a b) = Ico (a + c) (b + c)

Next tactic:
rw [← coe_inj, coe_map, coe_Ico, coe_Ico]
@[simp]
theorem map_add_right_Ico (a b c : α) :
    (Ico a b).map (addRightEmbedding c) = Ico (a + c) (b + c) := by
  rw [← coe_inj, coe_map, coe_Ico, coe_Ico]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Ico a b = Set.Ico (a + c) (b + c)

Next tactic:
exact Set.image_add_const_Ico _ _ _
@[simp]
theorem map_add_left_Ioc (a b c : α) :
    (Ioc a b).map (addLeftEmbedding c) = Ioc (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addLeftEmbedding c) (Ioc a b) = Ioc (c + a) (c + b)

Next tactic:
rw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]
@[simp]
theorem map_add_left_Ioc (a b c : α) :
    (Ioc a b).map (addLeftEmbedding c) = Ioc (c + a) (c + b) := by
  rw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addLeftEmbedding c) '' Set.Ioc a b = Set.Ioc (c + a) (c + b)

Next tactic:
exact Set.image_const_add_Ioc _ _ _
@[simp]
theorem map_add_right_Ioc (a b c : α) :
    (Ioc a b).map (addRightEmbedding c) = Ioc (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addRightEmbedding c) (Ioc a b) = Ioc (a + c) (b + c)

Next tactic:
rw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]
@[simp]
theorem map_add_right_Ioc (a b c : α) :
    (Ioc a b).map (addRightEmbedding c) = Ioc (a + c) (b + c) := by
  rw [← coe_inj, coe_map, coe_Ioc, coe_Ioc]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Ioc a b = Set.Ioc (a + c) (b + c)

Next tactic:
exact Set.image_add_const_Ioc _ _ _
@[simp]
theorem map_add_left_Ioo (a b c : α) :
    (Ioo a b).map (addLeftEmbedding c) = Ioo (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addLeftEmbedding c) (Ioo a b) = Ioo (c + a) (c + b)

Next tactic:
rw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]
@[simp]
theorem map_add_left_Ioo (a b c : α) :
    (Ioo a b).map (addLeftEmbedding c) = Ioo (c + a) (c + b) := by
  rw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addLeftEmbedding c) '' Set.Ioo a b = Set.Ioo (c + a) (c + b)

Next tactic:
exact Set.image_const_add_Ioo _ _ _
@[simp]
theorem map_add_right_Ioo (a b c : α) :
    (Ioo a b).map (addRightEmbedding c) = Ioo (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (addRightEmbedding c) (Ioo a b) = Ioo (a + c) (b + c)

Next tactic:
rw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]
@[simp]
theorem map_add_right_Ioo (a b c : α) :
    (Ioo a b).map (addRightEmbedding c) = Ioo (a + c) (b + c) := by
  rw [← coe_inj, coe_map, coe_Ioo, coe_Ioo]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ ⇑(addRightEmbedding c) '' Set.Ioo a b = Set.Ioo (a + c) (b + c)

Next tactic:
exact Set.image_add_const_Ioo _ _ _
@[simp]
theorem image_add_left_Icc (a b c : α) : (Icc a b).image (c + ·) = Icc (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => c + x) (Icc a b) = Icc (c + a) (c + b)

Next tactic:
rw [← map_add_left_Icc, map_eq_image, addLeftEmbedding, Embedding.coeFn_mk]
@[simp]
theorem image_add_left_Ico (a b c : α) : (Ico a b).image (c + ·) = Ico (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => c + x) (Ico a b) = Ico (c + a) (c + b)

Next tactic:
rw [← map_add_left_Ico, map_eq_image, addLeftEmbedding, Embedding.coeFn_mk]
@[simp]
theorem image_add_left_Ioc (a b c : α) : (Ioc a b).image (c + ·) = Ioc (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => c + x) (Ioc a b) = Ioc (c + a) (c + b)

Next tactic:
rw [← map_add_left_Ioc, map_eq_image, addLeftEmbedding, Embedding.coeFn_mk]
@[simp]
theorem image_add_left_Ioo (a b c : α) : (Ioo a b).image (c + ·) = Ioo (c + a) (c + b) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => c + x) (Ioo a b) = Ioo (c + a) (c + b)

Next tactic:
rw [← map_add_left_Ioo, map_eq_image, addLeftEmbedding, Embedding.coeFn_mk]
@[simp]
theorem image_add_right_Icc (a b c : α) : (Icc a b).image (· + c) = Icc (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => x + c) (Icc a b) = Icc (a + c) (b + c)

Next tactic:
rw [← map_add_right_Icc, map_eq_image, addRightEmbedding, Embedding.coeFn_mk]
theorem image_add_right_Ico (a b c : α) : (Ico a b).image (· + c) = Ico (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => x + c) (Ico a b) = Ico (a + c) (b + c)

Next tactic:
rw [← map_add_right_Ico, map_eq_image, addRightEmbedding, Embedding.coeFn_mk]
theorem image_add_right_Ioc (a b c : α) : (Ioc a b).image (· + c) = Ioc (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => x + c) (Ioc a b) = Ioc (a + c) (b + c)

Next tactic:
rw [← map_add_right_Ioc, map_eq_image, addRightEmbedding, Embedding.coeFn_mk]
theorem image_add_right_Ioo (a b c : α) : (Ioo a b).image (· + c) = Ioo (a + c) (b + c) := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => x + c) (Ioo a b) = Ioo (a + c) (b + c)

Next tactic:
rw [← map_add_right_Ioo, map_eq_image, addRightEmbedding, Embedding.coeFn_mk]
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∏ i : ι, ∏ j in Ioi i, f j i * f i j = ∏ i : ι, ∏ j in {i}ᶜ, f j i

Next tactic:
simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  

Proof state:
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ (∏ x : ι, ∏ x_1 in Ioi x, f x_1 x) * ∏ x : ι, ∏ x_1 in Ioi x, f x x_1 =
    (∏ x : ι, ∏ x_1 in Ioi x, f x_1 x) * ∏ x : ι, ∏ x_1 in Iio x, f x_1 x

Next tactic:
congr 1
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  

Proof state:
case e_a
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∏ x : ι, ∏ x_1 in Ioi x, f x x_1 = ∏ x : ι, ∏ x_1 in Iio x, f x_1 x

Next tactic:
rw [prod_sigma', prod_sigma']
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  

Proof state:
case e_a
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∏ x in Finset.sigma univ fun x => Ioi x, f x.fst x.snd = ∏ x in Finset.sigma univ fun x => Iio x, f x.snd x.fst

Next tactic:
refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _ <;> 

Proof state:
case e_a.refine'_1
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),
    (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Iio x

Next tactic:
simp
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _ <;> 

Proof state:
case e_a.refine'_2
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),
    f a.fst a.snd =
      f ((fun i x => { fst := i.snd, snd := i.fst }) a ha).snd ((fun i x => { fst := i.snd, snd := i.fst }) a ha).fst

Next tactic:
simp
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _ <;> 

Proof state:
case e_a.refine'_3
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Iio x),
    (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Ioi x

Next tactic:
simp
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _ <;> 

Proof state:
case e_a.refine'_4
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Ioi x),
    (fun i x => { fst := i.snd, snd := i.fst }) ((fun i x => { fst := i.snd, snd := i.fst }) a ha)
        (_ : (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Iio x) =
      a

Next tactic:
simp
@[to_additive]
theorem prod_prod_Ioi_mul_eq_prod_prod_off_diag [Fintype ι] [LinearOrder ι]
    [LocallyFiniteOrderTop ι] [LocallyFiniteOrderBot ι] [CommMonoid α] (f : ι → ι → α) :
    (∏ i, ∏ j in Ioi i, f j i * f i j) = ∏ i, ∏ j in {i}ᶜ, f j i := by
  simp_rw [← Ioi_disjUnion_Iio, prod_disjUnion, prod_mul_distrib]
  congr 1
  rw [prod_sigma', prod_sigma']
  refine' prod_bij' (fun i _ => ⟨i.2, i.1⟩) _ _ (fun i _ => ⟨i.2, i.1⟩) _ _ _ <;> 

Proof state:
case e_a.refine'_5
ι : Type u_1
α : Type u_2
inst✝⁴ : Fintype ι
inst✝³ : LinearOrder ι
inst✝² : LocallyFiniteOrderTop ι
inst✝¹ : LocallyFiniteOrderBot ι
inst✝ : CommMonoid α
f : ι → ι → α
⊢ ∀ (a : (_ : ι) × ι) (ha : a ∈ Finset.sigma univ fun x => Iio x),
    (fun i x => { fst := i.snd, snd := i.fst }) ((fun i x => { fst := i.snd, snd := i.fst }) a ha)
        (_ : (fun i x => { fst := i.snd, snd := i.fst }) a ha ∈ Finset.sigma univ fun x => Ioi x) =
      a

Next tactic:
simp