1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: map_rootsOfUnity_eq_pow_self
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: obtain ⟨m, hm⟩ := MonoidHom.map_cyclic (restrictRootsOfUnity σ k)
state_before: M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁶ : CommMonoid M
inst✝⁵ : CommMonoid N
inst✝⁴ : DivisionCommMonoid G
k l : ℕ+
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : FunLike F R R
inst✝ : RingHomClass F R R
σ : F
ζ : ↥(rootsOfUnity k R)
⊢ ∃ m, σ ↑↑ζ = ↑↑ζ ^ m
state_after: case intro
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁶ : CommMonoid M
inst✝⁵ : CommMonoid N
inst✝⁴ : DivisionCommMonoid G
k l : ℕ+
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : FunLike F R R
inst✝ : RingHomClass F R R
σ : F
ζ : ↥(rootsOfUnity k R)
m : ℤ
hm : ∀ (g : ↥(rootsOfUnity k R)), (restrictRootsOfUnity σ k) g = g ^ m
⊢ ∃ m, σ ↑↑ζ = ↑↑ζ ^ m

tactic: rw [← restrictRootsOfUnity_coe_apply, hm, ← zpow_mod_orderOf, ← Int.toNat_of_nonneg
    (m.emod_nonneg (Int.natCast_ne_zero.mpr (pos_iff_ne_zero.mp (orderOf_pos ζ)))),
  zpow_natCast, rootsOfUnity.coe_pow]
state_before: case intro
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁶ : CommMonoid M
inst✝⁵ : CommMonoid N
inst✝⁴ : DivisionCommMonoid G
k l : ℕ+
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : FunLike F R R
inst✝ : RingHomClass F R R
σ : F
ζ : ↥(rootsOfUnity k R)
m : ℤ
hm : ∀ (g : ↥(rootsOfUnity k R)), (restrictRootsOfUnity σ k) g = g ^ m
⊢ ∃ m, σ ↑↑ζ = ↑↑ζ ^ m
state_after: case intro
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁶ : CommMonoid M
inst✝⁵ : CommMonoid N
inst✝⁴ : DivisionCommMonoid G
k l : ℕ+
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : FunLike F R R
inst✝ : RingHomClass F R R
σ : F
ζ : ↥(rootsOfUnity k R)
m : ℤ
hm : ∀ (g : ↥(rootsOfUnity k R)), (restrictRootsOfUnity σ k) g = g ^ m
⊢ ∃ m_1, ↑↑ζ ^ (m % ↑(orderOf ζ)).toNat = ↑↑ζ ^ m_1

tactic: exact ⟨(m % orderOf ζ).toNat, rfl⟩
state_before: case intro
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝⁶ : CommMonoid M
inst✝⁵ : CommMonoid N
inst✝⁴ : DivisionCommMonoid G
k l : ℕ+
inst✝³ : CommRing R
inst✝² : IsDomain R
inst✝¹ : FunLike F R R
inst✝ : RingHomClass F R R
σ : F
ζ : ↥(rootsOfUnity k R)
m : ℤ
hm : ∀ (g : ↥(rootsOfUnity k R)), (restrictRootsOfUnity σ k) g = g ^ m
⊢ ∃ m_1, ↑↑ζ ^ (m % ↑(orderOf ζ)).toNat = ↑↑ζ ^ m_1
state_after: no goals
Theorem: Set.image_preimage_inl_union_image_preimage_inr
File: Mathlib/Data/Set/Image.lean

tactic: rw [image_preimage_eq_inter_range, image_preimage_eq_inter_range, ← inter_union_distrib_left,
  range_inl_union_range_inr, inter_univ]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : ι → α
s✝ t : Set α
s : Set (α ⊕ β)
⊢ Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) = s
state_after: no goals
Theorem: Num.castNum_shiftLeft
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases m <;> dsimp only [← shiftl_eq_shiftLeft, shiftl]
state_before: α : Type u_1
m : Num
n : ℕ
⊢ ↑(m <<< n) = ↑m <<< n
state_after: case zero
α : Type u_1
n : ℕ
⊢ ↑0 = ↑zero <<< n

case pos
α : Type u_1
n : ℕ
a✝ : PosNum
⊢ ↑(pos (a✝ <<< n)) = ↑(pos a✝) <<< n

tactic: simp only [cast_pos]
state_before: case pos
α : Type u_1
n : ℕ
a✝ : PosNum
⊢ ↑(pos (a✝ <<< n)) = ↑(pos a✝) <<< n
state_after: case pos
α : Type u_1
n : ℕ
a✝ : PosNum
⊢ ↑(a✝ <<< n) = ↑a✝ <<< n

tactic: induction' n with n IH
state_before: case pos
α : Type u_1
n : ℕ
a✝ : PosNum
⊢ ↑(a✝ <<< n) = ↑a✝ <<< n
state_after: case pos.zero
α : Type u_1
a✝ : PosNum
⊢ ↑(a✝ <<< 0) = ↑a✝ <<< 0

case pos.succ
α : Type u_1
a✝ : PosNum
n : ℕ
IH : ↑(a✝ <<< n) = ↑a✝ <<< n
⊢ ↑(a✝ <<< (n + 1)) = ↑a✝ <<< (n + 1)

tactic: simp [PosNum.shiftl_succ_eq_bit0_shiftl, Nat.shiftLeft_succ, IH,
      Nat.bit0_val, pow_succ, ← mul_assoc, mul_comm,
      -shiftl_eq_shiftLeft, -PosNum.shiftl_eq_shiftLeft, shiftl]
state_before: case pos.succ
α : Type u_1
a✝ : PosNum
n : ℕ
IH : ↑(a✝ <<< n) = ↑a✝ <<< n
⊢ ↑(a✝ <<< (n + 1)) = ↑a✝ <<< (n + 1)
state_after: no goals

tactic: symm
state_before: case zero
α : Type u_1
n : ℕ
⊢ ↑0 = ↑zero <<< n
state_after: case zero
α : Type u_1
n : ℕ
⊢ ↑zero <<< n = ↑0

tactic: apply Nat.zero_shiftLeft
state_before: case zero
α : Type u_1
n : ℕ
⊢ ↑zero <<< n = ↑0
state_after: no goals

tactic: rfl
state_before: case pos.zero
α : Type u_1
a✝ : PosNum
⊢ ↑(a✝ <<< 0) = ↑a✝ <<< 0
state_after: no goals
Theorem: MeasureTheory.addContent_mono
File: Mathlib/MeasureTheory/Measure/AddContent.lean

tactic: have h := sum_addContent_le_of_subset (m := m) hC (I := {s}) ?_ ?_ ht ?_
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ m s ≤ m t
state_after: case refine_4
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
h : ∑ u ∈ {s}, m u ≤ m t
⊢ m s ≤ m t

case refine_1
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ↑{s} ⊆ C

case refine_2
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ (↑{s}).PairwiseDisjoint id

case refine_3
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ∀ s_1 ∈ {s}, s_1 ⊆ t

tactic: simpa only [sum_singleton] using h
state_before: case refine_4
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
h : ∑ u ∈ {s}, m u ≤ m t
⊢ m s ≤ m t
state_after: no goals

tactic: rwa [singleton_subset_set_iff]
state_before: case refine_1
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ↑{s} ⊆ C
state_after: no goals

tactic: simp only [coe_singleton, pairwiseDisjoint_singleton]
state_before: case refine_2
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ (↑{s}).PairwiseDisjoint id
state_after: no goals

tactic: simp [hst]
state_before: case refine_3
α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
m m' : AddContent C
hC : IsSetSemiring C
hs : s ∈ C
ht : t ∈ C
hst : s ⊆ t
⊢ ∀ s_1 ∈ {s}, s_1 ⊆ t
state_after: no goals
Theorem: Cardinal.mul_lt_aleph0
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← Nat.cast_mul]
state_before: α β : Type u
a b : Cardinal.{u_1}
m n : ℕ
ha : ↑m < ℵ₀
hb : ↑n < ℵ₀
⊢ ↑m * ↑n < ℵ₀
state_after: α β : Type u
a b : Cardinal.{u_1}
m n : ℕ
ha : ↑m < ℵ₀
hb : ↑n < ℵ₀
⊢ ↑(m * n) < ℵ₀

tactic: apply nat_lt_aleph0
state_before: α β : Type u
a b : Cardinal.{u_1}
m n : ℕ
ha : ↑m < ℵ₀
hb : ↑n < ℵ₀
⊢ ↑(m * n) < ℵ₀
state_after: no goals
Theorem: all_mem_nhds
File: Mathlib/Topology/Basic.lean

tactic: simp only [@and_comm (x ∈ _), and_imp]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x✝ : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
x : X
P : Set X → Prop
hP : ∀ (s t : Set X), s ⊆ t → P s → P t
⊢ (∀ (i : Set X), x ∈ i ∧ IsOpen i → P i) ↔ ∀ (s : Set X), IsOpen s → x ∈ s → P s
state_after: no goals
Theorem: MeasureTheory.le_hitting_of_exists
File: Mathlib/Probability/Process/HittingTime.lean

tactic: refine le_hitting ?_ ω
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ n ≤ hitting u s n m ω
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ n ≤ m

tactic: by_contra h
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
⊢ n ≤ m
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
h : ¬n ≤ m
⊢ False

tactic: rw [Set.Icc_eq_empty_of_lt (not_le.mp h)] at h_exists
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ Set.Icc n m, u j ω ∈ s
h : ¬n ≤ m
⊢ False
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ ∅, u j ω ∈ s
h : ¬n ≤ m
⊢ False

tactic: simp at h_exists
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m✝ : MeasurableSpace Ω
inst✝ : ConditionallyCompleteLinearOrder ι
u : ι → Ω → β
s : Set β
n i : ι
ω : Ω
m : ι
h_exists : ∃ j ∈ ∅, u j ω ∈ s
h : ¬n ≤ m
⊢ False
state_after: no goals
Theorem: CategoryTheory.Functor.IsCartesian.eq_of_fac
File: Mathlib/CategoryTheory/FiberedCategory/Cartesian.lean

tactic: rw [map_uniq p f φ φ' ψ hcomp, map_uniq p f φ φ' ψ' hcomp']
state_before: 𝒮 : Type u₁
𝒳 : Type u₂
inst✝⁵ : Category.{v₁, u₁} 𝒮
inst✝⁴ : Category.{v₂, u₂} 𝒳
p : 𝒳 ⥤ 𝒮
R S : 𝒮
a b : 𝒳
f : R ⟶ S
φ : a ⟶ b
inst✝³ : p.IsCartesian f φ
a' : 𝒳
φ' : a' ⟶ b
inst✝² : p.IsHomLift f φ'
ψ ψ' : a' ⟶ a
inst✝¹ : p.IsHomLift (𝟙 R) ψ
inst✝ : p.IsHomLift (𝟙 R) ψ'
hcomp : ψ ≫ φ = φ'
hcomp' : ψ' ≫ φ = φ'
⊢ ψ = ψ'
state_after: no goals
Theorem: Nat.pow_dvd_iff_dvd_floorRoot
File: Mathlib/Data/Nat/Factorization/Root.lean

tactic: obtain rfl | hn := eq_or_ne n 0
state_before: a b n : ℕ
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b
state_after: case inl
a b : ℕ
⊢ a ^ 0 ∣ b ↔ a ∣ floorRoot 0 b

case inr
a b n : ℕ
hn : n ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b

tactic: obtain rfl | hb := eq_or_ne b 0
state_before: case inr
a b n : ℕ
hn : n ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b
state_after: case inr.inl
a n : ℕ
hn : n ≠ 0
⊢ a ^ n ∣ 0 ↔ a ∣ n.floorRoot 0

case inr.inr
a b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b

tactic: obtain rfl | ha := eq_or_ne a 0
state_before: case inr.inr
a b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b
state_after: case inr.inr.inl
b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
⊢ 0 ^ n ∣ b ↔ 0 ∣ n.floorRoot b

case inr.inr.inr
a b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
ha : a ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b

tactic: rw [← factorization_le_iff_dvd (pow_ne_zero _ ha) hb,
  ← factorization_le_iff_dvd ha (floorRoot_ne_zero.2 ⟨hn, hb⟩), factorization_pow,
  factorization_floorRoot, le_floorDiv_iff_smul_le (β := ℕ →₀ ℕ) (pos_iff_ne_zero.2 hn)]
state_before: case inr.inr.inr
a b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
ha : a ≠ 0
⊢ a ^ n ∣ b ↔ a ∣ n.floorRoot b
state_after: no goals

tactic: simp
state_before: case inl
a b : ℕ
⊢ a ^ 0 ∣ b ↔ a ∣ floorRoot 0 b
state_after: no goals

tactic: simp
state_before: case inr.inl
a n : ℕ
hn : n ≠ 0
⊢ a ^ n ∣ 0 ↔ a ∣ n.floorRoot 0
state_after: no goals

tactic: simp [hn]
state_before: case inr.inr.inl
b n : ℕ
hn : n ≠ 0
hb : b ≠ 0
⊢ 0 ^ n ∣ b ↔ 0 ∣ n.floorRoot b
state_after: no goals
Theorem: Real.strictAntiOn_logb
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rintro x (hx : x < 0) y (hy : y < 0) hxy
state_before: b x y : ℝ
hb : 1 < b
⊢ StrictAntiOn (logb b) (Iio 0)
state_after: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b y < logb b x

tactic: rw [← logb_abs y, ← logb_abs x]
state_before: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b y < logb b x
state_after: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b |y| < logb b |x|

tactic: refine logb_lt_logb hb (abs_pos.2 hy.ne) ?_
state_before: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ logb b |y| < logb b |x|
state_after: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ |y| < |x|

tactic: rwa [abs_of_neg hy, abs_of_neg hx, neg_lt_neg_iff]
state_before: b x✝ y✝ : ℝ
hb : 1 < b
x : ℝ
hx : x < 0
y : ℝ
hy : y < 0
hxy : x < y
⊢ |y| < |x|
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.id_tensor_comp_tensor_id
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← tensor_comp]
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
f : W ⟶ X
g : Y ⟶ Z
⊢ (𝟙 Y ⊗ f) ≫ (g ⊗ 𝟙 X) = g ⊗ f
state_after: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
f : W ⟶ X
g : Y ⟶ Z
⊢ 𝟙 Y ≫ g ⊗ f ≫ 𝟙 X = g ⊗ f

tactic: simp
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
f : W ⟶ X
g : Y ⟶ Z
⊢ 𝟙 Y ≫ g ⊗ f ≫ 𝟙 X = g ⊗ f
state_after: no goals
Theorem: IsLocalization.smul_mk'_one
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [smul_mk', mul_one]
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
x : R
m : ↥M
⊢ x • mk' S 1 m = mk' S x m
state_after: no goals
Theorem: Subalgebra.unop_adjoin
File: Mathlib/Algebra/Algebra/Subalgebra/MulOpposite.lean

tactic: apply toSubsemiring_injective
state_before: ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
⊢ (Algebra.adjoin R s).unop = Algebra.adjoin R (MulOpposite.op ⁻¹' s)
state_after: case a
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
⊢ (Algebra.adjoin R s).unop.toSubsemiring = (Algebra.adjoin R (MulOpposite.op ⁻¹' s)).toSubsemiring

tactic: simp_rw [Algebra.adjoin, unop_toSubsemiring, Subsemiring.unop_closure, Set.preimage_union]
state_before: case a
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
⊢ (Algebra.adjoin R s).unop.toSubsemiring = (Algebra.adjoin R (MulOpposite.op ⁻¹' s)).toSubsemiring
state_after: case a
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
⊢ Subsemiring.closure (MulOpposite.op ⁻¹' Set.range ⇑(algebraMap R Aᵐᵒᵖ) ∪ MulOpposite.op ⁻¹' s) =
    Subsemiring.closure (Set.range ⇑(algebraMap R A) ∪ MulOpposite.op ⁻¹' s)

tactic: congr with x
state_before: case a
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
⊢ Subsemiring.closure (MulOpposite.op ⁻¹' Set.range ⇑(algebraMap R Aᵐᵒᵖ) ∪ MulOpposite.op ⁻¹' s) =
    Subsemiring.closure (Set.range ⇑(algebraMap R A) ∪ MulOpposite.op ⁻¹' s)
state_after: case a.e_s.e_a.h
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
x : A
⊢ x ∈ MulOpposite.op ⁻¹' Set.range ⇑(algebraMap R Aᵐᵒᵖ) ↔ x ∈ Set.range ⇑(algebraMap R A)

tactic: simp
state_before: case a.e_s.e_a.h
ι : Sort u_1
R : Type u_2
A : Type u_3
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
s : Set Aᵐᵒᵖ
x : A
⊢ x ∈ MulOpposite.op ⁻¹' Set.range ⇑(algebraMap R Aᵐᵒᵖ) ↔ x ∈ Set.range ⇑(algebraMap R A)
state_after: no goals
Theorem: Part.toFinset_none
File: Mathlib/Data/Finset/PImage.lean

tactic: simp [toFinset]
state_before: α : Type u_1
β : Type u_2
inst✝ : Decidable none.Dom
⊢ none.toFinset = ∅
state_after: no goals
Theorem: Set.pairwise_disjoint_Ioc_add_intCast
File: Mathlib/Algebra/Order/Interval/Set/Group.lean

tactic: simpa only [zsmul_one, Int.cast_add, Int.cast_one, ← add_assoc] using
  pairwise_disjoint_Ioc_add_zsmul a (1 : α)
state_before: α : Type u_1
inst✝ : OrderedRing α
a : α
⊢ Pairwise (Disjoint on fun n => Ioc (a + ↑n) (a + ↑n + 1))
state_after: no goals
Theorem: Homeomorph.image_connectedComponentIn
File: Mathlib/Topology/Homeomorph.lean

tactic: refine (h.continuous.image_connectedComponentIn_subset hx).antisymm ?_
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
x : X
hx : x ∈ s
⊢ ⇑h '' connectedComponentIn s x = connectedComponentIn (⇑h '' s) (h x)
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
x : X
hx : x ∈ s
⊢ connectedComponentIn (⇑h '' s) (h x) ⊆ ⇑h '' connectedComponentIn s x

tactic: have := h.symm.continuous.image_connectedComponentIn_subset (mem_image_of_mem h hx)
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
x : X
hx : x ∈ s
⊢ connectedComponentIn (⇑h '' s) (h x) ⊆ ⇑h '' connectedComponentIn s x
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
x : X
hx : x ∈ s
this : ⇑h.symm '' connectedComponentIn (⇑h '' s) (h x) ⊆ connectedComponentIn (⇑h.symm '' (⇑h '' s)) (h.symm (h x))
⊢ connectedComponentIn (⇑h '' s) (h x) ⊆ ⇑h '' connectedComponentIn s x

tactic: rwa [image_subset_iff, h.preimage_symm, h.image_symm, h.preimage_image, h.symm_apply_apply]
  at this
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝⁴ : TopologicalSpace X
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Z
X' : Type u_4
Y' : Type u_5
inst✝¹ : TopologicalSpace X'
inst✝ : TopologicalSpace Y'
s : Set X
h : X ≃ₜ Y
x : X
hx : x ∈ s
this : ⇑h.symm '' connectedComponentIn (⇑h '' s) (h x) ⊆ connectedComponentIn (⇑h.symm '' (⇑h '' s)) (h.symm (h x))
⊢ connectedComponentIn (⇑h '' s) (h x) ⊆ ⇑h '' connectedComponentIn s x
state_after: no goals
Theorem: Convex.translate_preimage_right
File: Mathlib/Analysis/Convex/Basic.lean

tactic: intro x hx y hy a b ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x : E
hs : Convex 𝕜 s
z : E
⊢ Convex 𝕜 ((fun x => z + x) ⁻¹' s)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
hs : Convex 𝕜 s
z x : E
hx : x ∈ (fun x => z + x) ⁻¹' s
y : E
hy : y ∈ (fun x => z + x) ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • x + b • y ∈ (fun x => z + x) ⁻¹' s

tactic: have h := hs hx hy ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
hs : Convex 𝕜 s
z x : E
hx : x ∈ (fun x => z + x) ⁻¹' s
y : E
hy : y ∈ (fun x => z + x) ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • x + b • y ∈ (fun x => z + x) ⁻¹' s
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
hs : Convex 𝕜 s
z x : E
hx : x ∈ (fun x => z + x) ⁻¹' s
y : E
hy : y ∈ (fun x => z + x) ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
h : a • (fun x => z + x) x + b • (fun x => z + x) y ∈ s
⊢ a • x + b • y ∈ (fun x => z + x) ⁻¹' s

tactic: rwa [smul_add, smul_add, add_add_add_comm, ← add_smul, hab, one_smul] at h
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x✝ : E
hs : Convex 𝕜 s
z x : E
hx : x ∈ (fun x => z + x) ⁻¹' s
y : E
hy : y ∈ (fun x => z + x) ⁻¹' s
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
h : a • (fun x => z + x) x + b • (fun x => z + x) y ∈ s
⊢ a • x + b • y ∈ (fun x => z + x) ⁻¹' s
state_after: no goals
Theorem: Set.sigmaToiUnion_injective
File: Mathlib/Data/Set/Lattice.lean

tactic: subst b_eq
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
h : Pairwise fun i j => Disjoint (t i) (t j)
a₁ : α
b₁ : β
h₁ : b₁ ∈ t a₁
a₂ : α
b₂ : β
h₂ : b₂ ∈ t a₂
eq : sigmaToiUnion t ⟨a₁, ⟨b₁, h₁⟩⟩ = sigmaToiUnion t ⟨a₂, ⟨b₂, h₂⟩⟩
b_eq : b₁ = b₂
a_eq : a₁ = a₂
⊢ ↑(Eq.recOn a_eq ⟨a₁, ⟨b₁, h₁⟩⟩.snd) = ↑⟨a₂, ⟨b₂, h₂⟩⟩.snd
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
h : Pairwise fun i j => Disjoint (t i) (t j)
a₁ : α
b₁ : β
h₁ : b₁ ∈ t a₁
a₂ : α
a_eq : a₁ = a₂
h₂ : b₁ ∈ t a₂
eq : sigmaToiUnion t ⟨a₁, ⟨b₁, h₁⟩⟩ = sigmaToiUnion t ⟨a₂, ⟨b₁, h₂⟩⟩
⊢ ↑(Eq.recOn a_eq ⟨a₁, ⟨b₁, h₁⟩⟩.snd) = ↑⟨a₂, ⟨b₁, h₂⟩⟩.snd

tactic: subst a_eq
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
h : Pairwise fun i j => Disjoint (t i) (t j)
a₁ : α
b₁ : β
h₁ : b₁ ∈ t a₁
a₂ : α
a_eq : a₁ = a₂
h₂ : b₁ ∈ t a₂
eq : sigmaToiUnion t ⟨a₁, ⟨b₁, h₁⟩⟩ = sigmaToiUnion t ⟨a₂, ⟨b₁, h₂⟩⟩
⊢ ↑(Eq.recOn a_eq ⟨a₁, ⟨b₁, h₁⟩⟩.snd) = ↑⟨a₂, ⟨b₁, h₂⟩⟩.snd
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
h : Pairwise fun i j => Disjoint (t i) (t j)
a₁ : α
b₁ : β
h₁ h₂ : b₁ ∈ t a₁
eq : sigmaToiUnion t ⟨a₁, ⟨b₁, h₁⟩⟩ = sigmaToiUnion t ⟨a₁, ⟨b₁, h₂⟩⟩
⊢ ↑(Eq.recOn ⋯ ⟨a₁, ⟨b₁, h₁⟩⟩.snd) = ↑⟨a₁, ⟨b₁, h₂⟩⟩.snd

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
h : Pairwise fun i j => Disjoint (t i) (t j)
a₁ : α
b₁ : β
h₁ h₂ : b₁ ∈ t a₁
eq : sigmaToiUnion t ⟨a₁, ⟨b₁, h₁⟩⟩ = sigmaToiUnion t ⟨a₁, ⟨b₁, h₂⟩⟩
⊢ ↑(Eq.recOn ⋯ ⟨a₁, ⟨b₁, h₁⟩⟩.snd) = ↑⟨a₁, ⟨b₁, h₂⟩⟩.snd
state_after: no goals
Theorem: IsLocallyConstant.desc
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: rw [← preimage_image_eq s inj, preimage_preimage]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
α✝ : Type u_4
inst✝ : TopologicalSpace X
α : Type u_5
β : Type u_6
f : X → α
g : α → β
h : IsLocallyConstant (g ∘ f)
inj : Function.Injective g
s : Set α
⊢ IsOpen (f ⁻¹' s)
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
α✝ : Type u_4
inst✝ : TopologicalSpace X
α : Type u_5
β : Type u_6
f : X → α
g : α → β
h : IsLocallyConstant (g ∘ f)
inj : Function.Injective g
s : Set α
⊢ IsOpen ((fun x => g (f x)) ⁻¹' (g '' s))

tactic: exact h (g '' s)
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
α✝ : Type u_4
inst✝ : TopologicalSpace X
α : Type u_5
β : Type u_6
f : X → α
g : α → β
h : IsLocallyConstant (g ∘ f)
inj : Function.Injective g
s : Set α
⊢ IsOpen ((fun x => g (f x)) ⁻¹' (g '' s))
state_after: no goals
Theorem: geom_sum_Ico_mul
File: Mathlib/Algebra/GeomSum.lean

tactic: rw [sum_Ico_eq_sub _ hmn, sub_mul, geom_sum_mul, geom_sum_mul, sub_sub_sub_cancel_right]
state_before: α : Type u
inst✝ : Ring α
x : α
m n : ℕ
hmn : m ≤ n
⊢ (∑ i ∈ Ico m n, x ^ i) * (x - 1) = x ^ n - x ^ m
state_after: no goals
Theorem: RCLike.norm_sq_re_add_conj
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [add_conj, ← ofReal_ofNat, ← ofReal_mul, norm_ofReal, sq_abs, ofReal_re]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z x : K
⊢ ‖x + (starRingEnd K) x‖ ^ 2 = re (x + (starRingEnd K) x) ^ 2
state_after: no goals