1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PartialHomeomorph.nhds_eq_comap_inf_principal
File: Mathlib/Topology/PartialHomeomorph.lean

tactic: lift x to e.source using hx
state_before: X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
x : X
hx : x ∈ e.source
⊢ 𝓝 x = comap (↑e) (𝓝 (↑e x)) ⊓ 𝓟 e.source
state_after: case intro
X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
x : { x // x ∈ e.source }
⊢ 𝓝 ↑x = comap (↑e) (𝓝 (↑e ↑x)) ⊓ 𝓟 e.source

tactic: rw [← e.open_source.nhdsWithin_eq x.2, ← map_nhds_subtype_val, ← map_comap_setCoe_val,
  e.toHomeomorphSourceTarget.nhds_eq_comap, nhds_subtype_eq_comap]
state_before: case intro
X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
x : { x // x ∈ e.source }
⊢ 𝓝 ↑x = comap (↑e) (𝓝 (↑e ↑x)) ⊓ 𝓟 e.source
state_after: case intro
X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
x : { x // x ∈ e.source }
⊢ map Subtype.val (comap (⇑e.toHomeomorphSourceTarget) (comap Subtype.val (𝓝 ↑(e.toHomeomorphSourceTarget x)))) =
    map Subtype.val (comap Subtype.val (comap (↑e) (𝓝 (↑e ↑x))))
Theorem: VonNeumannAlgebra.commutant_commutant
File: Mathlib/Analysis/VonNeumannAlgebra/Basic.lean

tactic: simp
state_before: H : Type u
inst✝² : NormedAddCommGroup H
inst✝¹ : InnerProductSpace ℂ H
inst✝ : CompleteSpace H
S : VonNeumannAlgebra H
⊢ ↑S.commutant.commutant = ↑S
state_after: no goals
Theorem: GroupFilterBasis.nhds_hasBasis
File: Mathlib/Topology/Algebra/FilterBasis.lean

tactic: rw [B.nhds_eq]
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ (𝓝 x₀).HasBasis (fun V => V ∈ B) fun V => (fun y => x₀ * y) '' V
state_after: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ (B.N x₀).HasBasis (fun V => V ∈ B) fun V => (fun y => x₀ * y) '' V

tactic: apply B.hasBasis
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ (B.N x₀).HasBasis (fun V => V ∈ B) fun V => (fun y => x₀ * y) '' V
state_after: no goals
Theorem: AntitoneOn.sum_le_integral_Ico
File: Mathlib/Analysis/SumIntegralComparisons.lean

tactic: rw [(Nat.sub_add_cancel hab).symm, Nat.cast_add]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ ∑ i ∈ Finset.Ico a b, f ↑(i + 1) ≤ ∫ (x : ℝ) in ↑a..↑b, f x
state_after: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ ∑ i ∈ Finset.Ico a (b - a + a), f ↑(i + 1) ≤ ∫ (x : ℝ) in ↑a..↑(b - a) + ↑a, f x

tactic: rw [← Finset.sum_Ico_add, Nat.Ico_zero_eq_range]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ ∑ i ∈ Finset.Ico (0 + a) (b - a + a), f ↑(i + 1) ≤ ∫ (x : ℝ) in ↑a..↑a + ↑(b - a), f x
state_after: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ ∑ x ∈ Finset.range (b - a), f ↑(a + x + 1) ≤ ∫ (x : ℝ) in ↑a..↑a + ↑(b - a), f x

tactic: apply AntitoneOn.sum_le_integral
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ ∑ x ∈ Finset.range (b - a), f (↑a + ↑(x + 1)) ≤ ∫ (x : ℝ) in ↑a..↑a + ↑(b - a), f x
state_after: case hf
x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ AntitoneOn f (Icc (↑a) (↑a + ↑(b - a)))

tactic: simp only [hf, hab, Nat.cast_sub, add_sub_cancel]
state_before: case hf
x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ AntitoneOn f (Icc (↑a) (↑a + ↑(b - a)))
state_after: no goals
Theorem: MeasureTheory.Measure.forall_measure_inter_spanningSets_eq_zero
File: Mathlib/MeasureTheory/Measure/Typeclasses.lean

tactic: nth_rw 2 [show s = ⋃ n, s ∩ spanningSets μ n by
    rw [← inter_iUnion, iUnion_spanningSets, inter_univ] ]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : SigmaFinite μ
s : Set α
⊢ (∀ (n : ℕ), μ (s ∩ spanningSets μ n) = 0) ↔ μ s = 0
state_after: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : SigmaFinite μ
s : Set α
⊢ (∀ (n : ℕ), μ (s ∩ spanningSets μ n) = 0) ↔ μ (⋃ n, s ∩ spanningSets μ n) = 0

tactic: rw [measure_iUnion_null_iff]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : SigmaFinite μ
s : Set α
⊢ (∀ (n : ℕ), μ (s ∩ spanningSets μ n) = 0) ↔ μ (⋃ n, s ∩ spanningSets μ n) = 0
state_after: no goals

tactic: rw [← inter_iUnion, iUnion_spanningSets, inter_univ]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
μ✝ ν ν₁ ν₂ : Measure α
s✝ t : Set α
inst✝¹ : MeasurableSpace α
μ : Measure α
inst✝ : SigmaFinite μ
s : Set α
⊢ s = ⋃ n, s ∩ spanningSets μ n
state_after: no goals
Theorem: Multiset.count_sum'
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: dsimp only [Finset.sum]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : DecidableEq α
s : Finset β
a : α
f : β → Multiset α
⊢ count a (∑ x ∈ s, f x) = ∑ x ∈ s, count a (f x)
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : DecidableEq α
s : Finset β
a : α
f : β → Multiset α
⊢ count a (map (fun x => f x) s.val).sum = (map (fun x => count a (f x)) s.val).sum

tactic: rw [count_sum]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝ : DecidableEq α
s : Finset β
a : α
f : β → Multiset α
⊢ count a (map (fun x => f x) s.val).sum = (map (fun x => count a (f x)) s.val).sum
state_after: no goals
Theorem: Bimod.TensorBimod.whiskerLeft_π_actLeft
File: Mathlib/CategoryTheory/Monoidal/Bimod.lean

tactic: erw [map_π_preserves_coequalizer_inv_colimMap (tensorLeft _)]
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
⊢ R.X ◁ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft) ≫ actLeft P Q =
    (α_ R.X P.X Q.X).inv ≫ P.actLeft ▷ Q.X ≫ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft)
state_after: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
⊢ ((α_ R.X P.X Q.X).inv ≫ P.actLeft ▷ Q.X) ≫ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft) =
    (α_ R.X P.X Q.X).inv ≫ P.actLeft ▷ Q.X ≫ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft)

tactic: simp only [Category.assoc]
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
⊢ ((α_ R.X P.X Q.X).inv ≫ P.actLeft ▷ Q.X) ≫ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft) =
    (α_ R.X P.X Q.X).inv ≫ P.actLeft ▷ Q.X ≫ coequalizer.π (P.actRight ▷ Q.X) ((α_ P.X S.X Q.X).hom ≫ P.X ◁ Q.actLeft)
state_after: no goals
Theorem: Multiset.card_eq_zero
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [e]
state_before: α : Type u_1
β : Type v
γ : Type u_2
s : Multiset α
e : s = 0
⊢ card s = 0
state_after: no goals
Theorem: List.Perm.dedup
File: Mathlib/Data/List/Perm.lean

tactic: simp [nodup_dedup, h, p.subset h]
state_before: α : Type u_1
β : Type u_2
l l₁✝ l₂✝ : List α
a✝ : α
inst✝ : DecidableEq α
l₁ l₂ : List α
p : l₁ ~ l₂
a : α
h : a ∈ l₁
⊢ count a l₁.dedup = count a l₂.dedup
state_after: no goals

tactic: simp [h, mt p.mem_iff.2 h]
state_before: α : Type u_1
β : Type u_2
l l₁✝ l₂✝ : List α
a✝ : α
inst✝ : DecidableEq α
l₁ l₂ : List α
p : l₁ ~ l₂
a : α
h : a ∉ l₁
⊢ count a l₁.dedup = count a l₂.dedup
state_after: no goals
Theorem: Decidable.mul_lt_mul''
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: rw [← b0, mul_zero]
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
h1 : a < c
h2 : b < d
h3 : 0 ≤ a
h4 : 0 ≤ b
b0 : 0 = b
⊢ a * b < c * d
state_after: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
h1 : a < c
h2 : b < d
h3 : 0 ≤ a
h4 : 0 ≤ b
b0 : 0 = b
⊢ 0 < c * d

tactic: exact mul_pos (h3.trans_lt h1) (h4.trans_lt h2)
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
h1 : a < c
h2 : b < d
h3 : 0 ≤ a
h4 : 0 ≤ b
b0 : 0 = b
⊢ 0 < c * d
state_after: no goals
Theorem: Padic.valuation_map_mul
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: have h_norm : ‖x * y‖ = ‖x‖ * ‖y‖ := norm_mul x y
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
⊢ (x * y).valuation = x.valuation + y.valuation
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
⊢ (x * y).valuation = x.valuation + y.valuation

tactic: have hp_ne_one : (p : ℝ) ≠ 1 := by
  rw [← Nat.cast_one, Ne, Nat.cast_inj]
  exact Nat.Prime.ne_one hp.elim
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
⊢ (x * y).valuation = x.valuation + y.valuation
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
⊢ (x * y).valuation = x.valuation + y.valuation

tactic: have hp_pos : (0 : ℝ) < p := by
  rw [← Nat.cast_zero, Nat.cast_lt]
  exact Nat.Prime.pos hp.elim
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
⊢ (x * y).valuation = x.valuation + y.valuation
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
hp_pos : 0 < ↑p
⊢ (x * y).valuation = x.valuation + y.valuation

tactic: rw [norm_eq_pow_val hx, norm_eq_pow_val hy, norm_eq_pow_val (mul_ne_zero hx hy), ←
  zpow_add₀ (ne_of_gt hp_pos), zpow_inj hp_pos hp_ne_one, ← neg_add, neg_inj] at h_norm
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
hp_pos : 0 < ↑p
⊢ (x * y).valuation = x.valuation + y.valuation
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : (x * y).valuation = x.valuation + y.valuation
hp_ne_one : ↑p ≠ 1
hp_pos : 0 < ↑p
⊢ (x * y).valuation = x.valuation + y.valuation

tactic: exact h_norm
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : (x * y).valuation = x.valuation + y.valuation
hp_ne_one : ↑p ≠ 1
hp_pos : 0 < ↑p
⊢ (x * y).valuation = x.valuation + y.valuation
state_after: no goals

tactic: rw [← Nat.cast_one, Ne, Nat.cast_inj]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
⊢ ↑p ≠ 1
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
⊢ ¬p = 1

tactic: exact Nat.Prime.ne_one hp.elim
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
⊢ ¬p = 1
state_after: no goals

tactic: rw [← Nat.cast_zero, Nat.cast_lt]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
⊢ 0 < ↑p
state_after: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
⊢ 0 < p

tactic: exact Nat.Prime.pos hp.elim
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x y : ℚ_[p]
hx : x ≠ 0
hy : y ≠ 0
h_norm : ‖x * y‖ = ‖x‖ * ‖y‖
hp_ne_one : ↑p ≠ 1
⊢ 0 < p
state_after: no goals
Theorem: Turing.PartrecToTM2.head_supports
File: Mathlib/Computability/TMToPartrec.lean

tactic: dsimp only
state_before: S : Finset Λ'
k : K'
q : Λ'
H : Λ'.Supports S q
x✝ : Option Γ'
⊢ Λ'.Supports S
    ((fun s => (if s = some Γ'.consₗ then id else Λ'.clear (fun x => decide (x = Γ'.consₗ)) k) (unrev q)) x✝)
state_after: S : Finset Λ'
k : K'
q : Λ'
H : Λ'.Supports S q
x✝ : Option Γ'
⊢ Λ'.Supports S ((if x✝ = some Γ'.consₗ then id else Λ'.clear (fun x => decide (x = Γ'.consₗ)) k) (unrev q))

tactic: split_ifs <;> exact H
state_before: S : Finset Λ'
k : K'
q : Λ'
H : Λ'.Supports S q
x✝ : Option Γ'
⊢ Λ'.Supports S ((if x✝ = some Γ'.consₗ then id else Λ'.clear (fun x => decide (x = Γ'.consₗ)) k) (unrev q))
state_after: no goals
Theorem: preimage_map_fst_pullbackDiagonal
File: Mathlib/Data/Set/Prod.lean

tactic: ext ⟨⟨p₁, p₂⟩, he⟩
state_before: X : Type u_2
Y : Sort u_3
Z : Type u_1
f : X → Y
g : Z → Y
⊢ map_fst ⁻¹' pullbackDiagonal f = pullbackDiagonal snd
state_after: case h.mk.mk
X : Type u_2
Y : Sort u_3
Z : Type u_1
f : X → Y
g : Z → Y
p₁ p₂ : Pullback f g
he : (p₁, p₂).1.snd = (p₁, p₂).2.snd
⊢ ⟨(p₁, p₂), he⟩ ∈ map_fst ⁻¹' pullbackDiagonal f ↔ ⟨(p₁, p₂), he⟩ ∈ pullbackDiagonal snd

tactic: simp_rw [pullbackDiagonal, mem_setOf, Subtype.ext_iff, Prod.ext_iff]
state_before: case h.mk.mk
X : Type u_2
Y : Sort u_3
Z : Type u_1
f : X → Y
g : Z → Y
p₁ p₂ : Pullback f g
he : (p₁, p₂).1.snd = (p₁, p₂).2.snd
⊢ ⟨(p₁, p₂), he⟩ ∈ map_fst ⁻¹' pullbackDiagonal f ↔ ⟨(p₁, p₂), he⟩ ∈ pullbackDiagonal snd
state_after: case h.mk.mk
X : Type u_2
Y : Sort u_3
Z : Type u_1
f : X → Y
g : Z → Y
p₁ p₂ : Pullback f g
he : (p₁, p₂).1.snd = (p₁, p₂).2.snd
⊢ ⟨(p₁, p₂), he⟩ ∈ map_fst ⁻¹' {p | p.fst = p.snd} ↔
    (↑(fst ⟨(p₁, p₂), he⟩)).1 = (↑(snd ⟨(p₁, p₂), he⟩)).1 ∧ (↑(fst ⟨(p₁, p₂), he⟩)).2 = (↑(snd ⟨(p₁, p₂), he⟩)).2

tactic: exact (and_iff_left he).symm
state_before: case h.mk.mk
X : Type u_2
Y : Sort u_3
Z : Type u_1
f : X → Y
g : Z → Y
p₁ p₂ : Pullback f g
he : (p₁, p₂).1.snd = (p₁, p₂).2.snd
⊢ ⟨(p₁, p₂), he⟩ ∈ map_fst ⁻¹' {p | p.fst = p.snd} ↔
    (↑(fst ⟨(p₁, p₂), he⟩)).1 = (↑(snd ⟨(p₁, p₂), he⟩)).1 ∧ (↑(fst ⟨(p₁, p₂), he⟩)).2 = (↑(snd ⟨(p₁, p₂), he⟩)).2
state_after: no goals
Theorem: Set.image2_comm
File: Mathlib/Data/Set/NAry.lean

tactic: simp_rw [h_comm]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
f f' : α → β → γ
g✝ g' : α → β → γ → δ
s s' : Set α
t t' : Set β
u u' : Set γ
v : Set δ
a a' : α
b b' : β
c c' : γ
d d' : δ
g : β → α → γ
h_comm : ∀ (a : α) (b : β), f a b = g b a
⊢ image2 (fun a b => f b a) t s = image2 g t s
state_after: no goals
Theorem: MeasureTheory.restrict_withDensity
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

tactic: ext1 t ht
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
⊢ (μ.withDensity f).restrict s = (μ.restrict s).withDensity f
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
t : Set α
ht : MeasurableSet t
⊢ ((μ.withDensity f).restrict s) t = ((μ.restrict s).withDensity f) t

tactic: rw [restrict_apply ht, withDensity_apply _ ht, withDensity_apply _ (ht.inter hs),
  restrict_restrict ht]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
s : Set α
hs : MeasurableSet s
f : α → ℝ≥0∞
t : Set α
ht : MeasurableSet t
⊢ ((μ.withDensity f).restrict s) t = ((μ.restrict s).withDensity f) t
state_after: no goals
Theorem: Vector.get_replicate
File: Mathlib/Data/Vector/Basic.lean

tactic: apply List.getElem_replicate
state_before: n : ℕ
α : Type u_1
a : α
i : Fin n
⊢ (replicate n a).get i = a
state_after: no goals
Theorem: Real.tan_pi_div_three
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [tan_eq_sin_div_cos, sin_pi_div_three, cos_pi_div_three]
state_before: ⊢ tan (π / 3) = √3
state_after: ⊢ √3 / 2 / (1 / 2) = √3

tactic: ring
state_before: ⊢ √3 / 2 / (1 / 2) = √3
state_after: no goals
Theorem: IntermediateField.adjoin_eq_bot_iff
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [eq_bot_iff, adjoin_le_iff]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ adjoin F S = ⊥ ↔ S ⊆ ↑⊥
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ S ≤ ↑⊥ ↔ S ⊆ ↑⊥

tactic: rfl
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ S ≤ ↑⊥ ↔ S ⊆ ↑⊥
state_after: no goals
Theorem: MeasurableSpace.DynkinSystem.has_univ
File: Mathlib/MeasureTheory/PiSystem.lean

tactic: simpa using d.has_compl d.has_empty
state_before: α : Type u_1
d : DynkinSystem α
⊢ d.Has univ
state_after: no goals
Theorem: PrimeSpectrum.range_comap_of_surjective
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [← Set.image_univ]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ Set.range ⇑(comap f) = zeroLocus ↑(ker f)
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ ⇑(comap f) '' Set.univ = zeroLocus ↑(ker f)

tactic: convert image_comap_zeroLocus_eq_zeroLocus_comap _ _ hf _
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ ⇑(comap f) '' Set.univ = zeroLocus ↑(ker f)
state_after: case h.e'_2.h.e'_4
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ Set.univ = zeroLocus ↑⊥

tactic: rw [zeroLocus_bot]
state_before: case h.e'_2.h.e'_4
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
f : R →+* S
hf : Surjective ⇑f
⊢ Set.univ = zeroLocus ↑⊥
state_after: no goals
Theorem: ZNum.zneg_bit1
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases n <;> rfl
state_before: α : Type u_1
n : ZNum
⊢ -n.bit1 = (-n).bitm1
state_after: no goals
Theorem: Associates.mem_factors'_iff_dvd
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: constructor
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ ⟨Associates.mk p, ⋯⟩ ∈ factors' a ↔ p ∣ a
state_after: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ ⟨Associates.mk p, ⋯⟩ ∈ factors' a → p ∣ a

case mpr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ p ∣ a → ⟨Associates.mk p, ⋯⟩ ∈ factors' a

tactic: rw [← mk_dvd_mk]
state_before: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ ⟨Associates.mk p, ⋯⟩ ∈ factors' a → p ∣ a
state_after: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ ⟨Associates.mk p, ⋯⟩ ∈ factors' a → Associates.mk p ∣ Associates.mk a

tactic: apply dvd_of_mem_factors'
state_before: case mp
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ ⟨Associates.mk p, ⋯⟩ ∈ factors' a → Associates.mk p ∣ Associates.mk a
state_after: case mp.hz
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ a ≠ 0

tactic: apply ha0
state_before: case mp.hz
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ a ≠ 0
state_after: no goals

tactic: apply mem_factors'_of_dvd ha0 hp
state_before: case mpr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
⊢ p ∣ a → ⟨Associates.mk p, ⋯⟩ ∈ factors' a
state_after: no goals
Theorem: abs_eq_self
File: Mathlib/Algebra/Order/Group/Abs.lean

tactic: rw [abs_eq_max_neg, max_eq_left_iff, neg_le_self_iff]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a b c d : α
⊢ |a| = a ↔ 0 ≤ a
state_after: no goals
Theorem: Orientation.norm_div_cos_oangle_add_left_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ ‖y‖ / (o.oangle (x + y) y).cos = ‖x + y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle y (x + y)).cos = ‖x + y‖

tactic: rw [add_comm]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle y (x + y)).cos = ‖x + y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle y (y + x)).cos = ‖y + x‖

tactic: exact (-o).norm_div_cos_oangle_add_right_of_oangle_eq_pi_div_two h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ‖y‖ / ((-o).oangle y (y + x)).cos = ‖y + x‖
state_after: no goals
Theorem: Complex.arg_one_add_mem_Ioo
File: Mathlib/Analysis/SpecialFunctions/Complex/Arctan.lean

tactic: rw [Set.mem_Ioo, ← abs_lt, abs_arg_lt_pi_div_two_iff, add_re, one_re, ← neg_lt_iff_pos_add']
state_before: z : ℂ
hz : ‖z‖ < 1
⊢ (1 + z).arg ∈ Set.Ioo (-(π / 2)) (π / 2)
state_after: z : ℂ
hz : ‖z‖ < 1
⊢ -1 < z.re ∨ 1 + z = 0

tactic: exact Or.inl (abs_lt.mp ((abs_re_le_abs z).trans_lt (norm_eq_abs z ▸ hz))).1
state_before: z : ℂ
hz : ‖z‖ < 1
⊢ -1 < z.re ∨ 1 + z = 0
state_after: no goals