1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.ModEq.gcd_eq
File: Mathlib/Data/Nat/ModEq.lean

tactic: have h1 := gcd_dvd_right a m
state_before: m n a b c d : ℕ
h : a ≡ b [MOD m]
⊢ a.gcd m = b.gcd m
state_after: m n a b c d : ℕ
h : a ≡ b [MOD m]
h1 : a.gcd m ∣ m
⊢ a.gcd m = b.gcd m

tactic: have h2 := gcd_dvd_right b m
state_before: m n a b c d : ℕ
h : a ≡ b [MOD m]
h1 : a.gcd m ∣ m
⊢ a.gcd m = b.gcd m
state_after: m n a b c d : ℕ
h : a ≡ b [MOD m]
h1 : a.gcd m ∣ m
h2 : b.gcd m ∣ m
⊢ a.gcd m = b.gcd m

tactic: exact
  dvd_antisymm (dvd_gcd ((h.dvd_iff h1).mp (gcd_dvd_left a m)) h1)
    (dvd_gcd ((h.dvd_iff h2).mpr (gcd_dvd_left b m)) h2)
state_before: m n a b c d : ℕ
h : a ≡ b [MOD m]
h1 : a.gcd m ∣ m
h2 : b.gcd m ∣ m
⊢ a.gcd m = b.gcd m
state_after: no goals
Theorem: Set.directedOn_sUnion
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [sUnion_eq_iUnion]
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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃₀ S)
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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃ i, ↑i)

tactic: exact directedOn_iUnion (directedOn_iff_directed.mp hd) (fun i ↦ h i.1 i.2)
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
r : α → α → Prop
S : Set (Set α)
hd : DirectedOn (fun x x_1 => x ⊆ x_1) S
h : ∀ x ∈ S, DirectedOn r x
⊢ DirectedOn r (⋃ i, ↑i)
state_after: no goals
Theorem: IsQuasiSeparated.of_subset
File: Mathlib/Topology/QuasiSeparated.lean

tactic: intro U V hU hU' hU'' hV hV' hV''
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s t : Set α
ht : IsQuasiSeparated t
h : s ⊆ t
⊢ IsQuasiSeparated s
state_after: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s t : Set α
ht : IsQuasiSeparated t
h : s ⊆ t
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (U ∩ V)

tactic: exact ht U V (hU.trans h) hU' hU'' (hV.trans h) hV' hV''
state_before: α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : α → β
s t : Set α
ht : IsQuasiSeparated t
h : s ⊆ t
U V : Set α
hU : U ⊆ s
hU' : IsOpen U
hU'' : IsCompact U
hV : V ⊆ s
hV' : IsOpen V
hV'' : IsCompact V
⊢ IsCompact (U ∩ V)
state_after: no goals
Theorem: lift_rank_eq_of_surjective
File: Mathlib/LinearAlgebra/Dimension/RankNullity.lean

tactic: rw [← lift_rank_range_add_rank_ker f, ← rank_range_of_surjective f h]
state_before: R : Type u_1
M M₁ M₂ M₃ : Type u
M' : Type v
inst✝¹¹ : Ring R
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : AddCommGroup M₁
inst✝⁸ : AddCommGroup M₂
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : AddCommGroup M'
inst✝⁵ : Module R M
inst✝⁴ : Module R M₁
inst✝³ : Module R M₂
inst✝² : Module R M₃
inst✝¹ : Module R M'
inst✝ : HasRankNullity.{u, u_1} R
f : M →ₗ[R] M'
h : Surjective ⇑f
⊢ lift.{v, u} (Module.rank R M) = lift.{u, v} (Module.rank R M') + lift.{v, u} (Module.rank R ↥(LinearMap.ker f))
state_after: no goals
Theorem: Ordset.empty_iff
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: cases h
state_before: α : Type u_1
inst✝ : Preorder α
s : Ordset α
h : s = ∅
⊢ (↑s).empty = true
state_after: case refl
α : Type u_1
inst✝ : Preorder α
⊢ (↑∅).empty = true

tactic: exact rfl
state_before: case refl
α : Type u_1
inst✝ : Preorder α
⊢ (↑∅).empty = true
state_after: no goals

tactic: cases s with | mk s_val _ => cases s_val <;> [rfl; cases h]
state_before: α : Type u_1
inst✝ : Preorder α
s : Ordset α
h : (↑s).empty = true
⊢ s = ∅
state_after: no goals

tactic: cases s_val <;> [rfl; cases h]
state_before: case mk
α : Type u_1
inst✝ : Preorder α
s_val : Ordnode α
property✝ : s_val.Valid
h : (↑⟨s_val, property✝⟩).empty = true
⊢ ⟨s_val, property✝⟩ = ∅
state_after: no goals
Theorem: Matrix.rank_eq_finrank_span_cols
File: Mathlib/Data/Matrix/Rank.lean

tactic: rw [rank, Matrix.range_mulVecLin]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : CommRing R
A : Matrix m n R
⊢ A.rank = finrank R ↥(Submodule.span R (Set.range Aᵀ))
state_after: no goals
Theorem: CategoryTheory.Limits.IsLimit.uniq_cone_morphism
File: Mathlib/CategoryTheory/Limits/IsLimit.lean

tactic: intro g
state_before: J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
C : Type u₃
inst✝ : Category.{v₃, u₃} C
F : J ⥤ C
s t : Cone F
h : IsLimit t
f f' : s ⟶ t
⊢ ∀ {g : s ⟶ t}, g = h.liftConeMorphism s
state_after: J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
C : Type u₃
inst✝ : Category.{v₃, u₃} C
F : J ⥤ C
s t : Cone F
h : IsLimit t
f f' g : s ⟶ t
⊢ g = h.liftConeMorphism s

tactic: apply ConeMorphism.ext
state_before: J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
C : Type u₃
inst✝ : Category.{v₃, u₃} C
F : J ⥤ C
s t : Cone F
h : IsLimit t
f f' g : s ⟶ t
⊢ g = h.liftConeMorphism s
state_after: case w
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
C : Type u₃
inst✝ : Category.{v₃, u₃} C
F : J ⥤ C
s t : Cone F
h : IsLimit t
f f' g : s ⟶ t
⊢ g.hom = (h.liftConeMorphism s).hom

tactic: exact h.uniq _ _ g.w
state_before: case w
J : Type u₁
inst✝² : Category.{v₁, u₁} J
K : Type u₂
inst✝¹ : Category.{v₂, u₂} K
C : Type u₃
inst✝ : Category.{v₃, u₃} C
F : J ⥤ C
s t : Cone F
h : IsLimit t
f f' g : s ⟶ t
⊢ g.hom = (h.liftConeMorphism s).hom
state_after: no goals
Theorem: frontier_univ_prod_eq
File: Mathlib/Topology/Constructions.lean

tactic: simp [frontier_prod_eq]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
s : Set Y
⊢ frontier (univ ×ˢ s) = univ ×ˢ frontier s
state_after: no goals
Theorem: MeasureTheory.lintegral_union
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [restrict_union hAB hB, lintegral_add_measure]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
A B : Set α
hB : MeasurableSet B
hAB : Disjoint A B
⊢ ∫⁻ (a : α) in A ∪ B, f a ∂μ = ∫⁻ (a : α) in A, f a ∂μ + ∫⁻ (a : α) in B, f a ∂μ
state_after: no goals
Theorem: QuadraticForm.discr_smul
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [discr, toMatrix'_smul, Matrix.det_smul]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
n : Type w
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R
inst✝³ : DecidableEq n
inst✝² : Invertible 2
m : Type w
inst✝¹ : DecidableEq m
inst✝ : Fintype m
Q : QuadraticForm R (n → R)
a : R
⊢ (a • Q).discr = a ^ Fintype.card n * Q.discr
state_after: no goals
Theorem: NNReal.rpow_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: rw [← NNReal.coe_inj, coe_rpow, ← NNReal.coe_eq_zero]
state_before: w x✝ y✝ z : ℝ
x : ℝ≥0
y : ℝ
⊢ x ^ y = 0 ↔ x = 0 ∧ y ≠ 0
state_after: w x✝ y✝ z : ℝ
x : ℝ≥0
y : ℝ
⊢ ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0

tactic: exact Real.rpow_eq_zero_iff_of_nonneg x.2
state_before: w x✝ y✝ z : ℝ
x : ℝ≥0
y : ℝ
⊢ ↑x ^ y = ↑0 ↔ ↑x = 0 ∧ y ≠ 0
state_after: no goals
Theorem: Metric.mem_ball_self
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

tactic: rwa [mem_ball, dist_self]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : 0 < ε
⊢ x ∈ ball x ε
state_after: no goals
Theorem: Metric.hausdorffDist_image
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [hausdorffDist, hausdorffEdist_image h]
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
h : Isometry Φ
⊢ hausdorffDist (Φ '' s) (Φ '' t) = hausdorffDist s t
state_after: no goals
Theorem: Complex.frontier_setOf_lt_re
File: Mathlib/Analysis/Complex/ReImTopology.lean

tactic: simpa only [frontier_Ioi] using frontier_preimage_re (Ioi a)
state_before: a : ℝ
⊢ frontier {z | a < z.re} = {z | z.re = a}
state_after: no goals
Theorem: Equiv.symm_symm
File: Mathlib/Logic/Equiv/Defs.lean

tactic: cases e
state_before: α : Sort u
β : Sort v
γ : Sort w
e : α ≃ β
⊢ e.symm.symm = e
state_after: case mk
α : Sort u
β : Sort v
γ : Sort w
toFun✝ : α → β
invFun✝ : β → α
left_inv✝ : LeftInverse invFun✝ toFun✝
right_inv✝ : Function.RightInverse invFun✝ toFun✝
⊢ { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.symm.symm =
    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }

tactic: rfl
state_before: case mk
α : Sort u
β : Sort v
γ : Sort w
toFun✝ : α → β
invFun✝ : β → α
left_inv✝ : LeftInverse invFun✝ toFun✝
right_inv✝ : Function.RightInverse invFun✝ toFun✝
⊢ { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }.symm.symm =
    { toFun := toFun✝, invFun := invFun✝, left_inv := left_inv✝, right_inv := right_inv✝ }
state_after: no goals
Theorem: Ideal.span_singleton_absNorm_le
File: Mathlib/RingTheory/Ideal/Norm.lean

tactic: simp only [Ideal.span_le, Set.singleton_subset_iff, SetLike.mem_coe, Ideal.absNorm_mem I]
state_before: S : Type u_1
inst✝⁵ : CommRing S
inst✝⁴ : IsDomain S
inst✝³ : Nontrivial S
inst✝² : IsDedekindDomain S
inst✝¹ : Module.Free ℤ S
inst✝ : Module.Finite ℤ S
I : Ideal S
⊢ span {↑(absNorm I)} ≤ I
state_after: no goals
Theorem: Batteries.RBSet.mem_insert
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: refine ⟨fun h => ?_, fun | .inl h => mem_insert_of_mem _ h | .inr h => mem_insert_of_eq _ h⟩
state_before: α : Type u_1
cmp : α → α → Ordering
v' v : α
inst✝ : TransCmp cmp
t : RBSet α cmp
⊢ v' ∈ t.insert v ↔ v' ∈ t ∨ cmp v v' = Ordering.eq
state_after: α : Type u_1
cmp : α → α → Ordering
v' v : α
inst✝ : TransCmp cmp
t : RBSet α cmp
h : v' ∈ t.insert v
⊢ v' ∈ t ∨ cmp v v' = Ordering.eq

tactic: let ⟨_, h₁, h₂⟩ := mem_iff_mem_toList.1 h
state_before: α : Type u_1
cmp : α → α → Ordering
v' v : α
inst✝ : TransCmp cmp
t : RBSet α cmp
h : v' ∈ t.insert v
⊢ v' ∈ t ∨ cmp v v' = Ordering.eq
state_after: α : Type u_1
cmp : α → α → Ordering
v' v : α
inst✝ : TransCmp cmp
t : RBSet α cmp
h : v' ∈ t.insert v
w✝ : α
h₁ : w✝ ∈ (t.insert v).toList
h₂ : cmp v' w✝ = Ordering.eq
⊢ v' ∈ t ∨ cmp v v' = Ordering.eq

tactic: match mem_toList_insert.1 h₁ with
| .inl ⟨h₃, _⟩ => exact .inl <| mem_iff_mem_toList.2 ⟨_, h₃, h₂⟩
| .inr rfl => exact .inr <| OrientedCmp.cmp_eq_eq_symm.1 h₂
state_before: α : Type u_1
cmp : α → α → Ordering
v' v : α
inst✝ : TransCmp cmp
t : RBSet α cmp
h : v' ∈ t.insert v
w✝ : α
h₁ : w✝ ∈ (t.insert v).toList
h₂ : cmp v' w✝ = Ordering.eq
⊢ v' ∈ t ∨ cmp v v' = Ordering.eq
state_after: no goals

tactic: exact .inl <| mem_iff_mem_toList.2 ⟨_, h₃, h₂⟩
state_before: α : Type u_1
cmp : α → α → Ordering
v' : α
inst✝ : TransCmp cmp
t : RBSet α cmp
w✝ : α
h₂ : cmp v' w✝ = Ordering.eq
v : α
h₃ : w✝ ∈ t.toList
right✝ : t.find? v ≠ some w✝
h : v' ∈ t.insert v
h₁ : w✝ ∈ (t.insert v).toList
⊢ v' ∈ t ∨ cmp v v' = Ordering.eq
state_after: no goals

tactic: exact .inr <| OrientedCmp.cmp_eq_eq_symm.1 h₂
state_before: α : Type u_1
cmp : α → α → Ordering
v' : α
inst✝ : TransCmp cmp
t : RBSet α cmp
w✝ : α
h₂ : cmp v' w✝ = Ordering.eq
h : v' ∈ t.insert w✝
h₁ : w✝ ∈ (t.insert w✝).toList
⊢ v' ∈ t ∨ cmp w✝ v' = Ordering.eq
state_after: no goals
Theorem: MeasureTheory.laverage_union
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: rw [restrict_union₀ hd ht, laverage_add_measure, restrict_apply_univ, restrict_apply_univ]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f g : α → ℝ≥0∞
hd : AEDisjoint μ s t
ht : NullMeasurableSet t μ
⊢ ⨍⁻ (x : α) in s ∪ t, f x ∂μ =
    μ s / (μ s + μ t) * ⨍⁻ (x : α) in s, f x ∂μ + μ t / (μ s + μ t) * ⨍⁻ (x : α) in t, f x ∂μ
state_after: no goals
Theorem: Complex.abs_eq_sqrt_sq_add_sq
File: Mathlib/Data/Complex/Abs.lean

tactic: rw [abs_apply, normSq_apply, sq, sq]
state_before: z : ℂ
⊢ abs z = √(z.re ^ 2 + z.im ^ 2)
state_after: no goals
Theorem: SimpleGraph.Walk.support_map
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
f : G →g G'
f' : G' →g G''
u v u' v' : V
p : G.Walk u v
⊢ (Walk.map f p).support = List.map (⇑f) p.support
state_after: no goals
Theorem: List.takeWhile_eq_self_iff
File: Mathlib/Data/List/Basic.lean

tactic: induction' l with x xs IH
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ takeWhile p l = l ↔ ∀ (x : α), x ∈ l → p x = true
state_after: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ takeWhile p [] = [] ↔ ∀ (x : α), x ∈ [] → p x = true

case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
l : List α
x : α
xs : List α
IH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true
⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true

tactic: simp
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
l : List α
⊢ takeWhile p [] = [] ↔ ∀ (x : α), x ∈ [] → p x = true
state_after: no goals

tactic: by_cases hp : p x <;> simp [hp, takeWhile_cons, IH]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
p : α → Bool
l : List α
x : α
xs : List α
IH : takeWhile p xs = xs ↔ ∀ (x : α), x ∈ xs → p x = true
⊢ takeWhile p (x :: xs) = x :: xs ↔ ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1 = true
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_inter_add_diff₀
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: ext1 u hu
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t s : Set α
ht : NullMeasurableSet t μ
⊢ μ.restrict (s ∩ t) + μ.restrict (s \ t) = μ.restrict s
state_after: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t s : Set α
ht : NullMeasurableSet t μ
u : Set α
hu : MeasurableSet u
⊢ (μ.restrict (s ∩ t) + μ.restrict (s \ t)) u = (μ.restrict s) u

tactic: simp only [add_apply, restrict_apply hu, ← inter_assoc, diff_eq]
state_before: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t s : Set α
ht : NullMeasurableSet t μ
u : Set α
hu : MeasurableSet u
⊢ (μ.restrict (s ∩ t) + μ.restrict (s \ t)) u = (μ.restrict s) u
state_after: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t s : Set α
ht : NullMeasurableSet t μ
u : Set α
hu : MeasurableSet u
⊢ μ (u ∩ s ∩ t) + μ (u ∩ s ∩ tᶜ) = μ (u ∩ s)

tactic: exact measure_inter_add_diff₀ (u ∩ s) ht
state_before: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t s : Set α
ht : NullMeasurableSet t μ
u : Set α
hu : MeasurableSet u
⊢ μ (u ∩ s ∩ t) + μ (u ∩ s ∩ tᶜ) = μ (u ∩ s)
state_after: no goals
Theorem: map_finset_sup'
File: Mathlib/Data/Finset/Lattice.lean

tactic: refine hs.cons_induction ?_ ?_ <;> intros <;> simp [*]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝³ : SemilatticeSup α
s✝ : Finset β
H : s✝.Nonempty
f✝ : β → α
inst✝² : SemilatticeSup β
inst✝¹ : FunLike F α β
inst✝ : SupHomClass F α β
f : F
s : Finset ι
hs : s.Nonempty
g : ι → α
⊢ f (s.sup' hs g) = s.sup' hs (⇑f ∘ g)
state_after: no goals
Theorem: ContinuousMap.image_coev
File: Mathlib/Topology/CompactOpen.lean

tactic: simp
state_before: α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
T : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace T
K : Set X
U : Set Y
y : Y
s : Set X
⊢ ⇑(coev X Y y) '' s = {y} ×ˢ s
state_after: no goals
Theorem: Real.cos_sq_arctan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: rw_mod_cast [one_div, ← inv_one_add_tan_sq (cos_arctan_pos x).ne', tan_arctan]
state_before: x : ℝ
⊢ cos (arctan x) ^ 2 = 1 / (1 + x ^ 2)
state_after: no goals
Theorem: Finset.map_ofDual_max
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [min_eq_inf_withTop, inf_image]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithBot.map (⇑ofDual) s.max = (image (⇑ofDual) s).min
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithBot.map (⇑ofDual) s.max = s.inf (WithTop.some ∘ ⇑ofDual)

tactic: exact congr_fun Option.map_id _
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : LinearOrder α
s✝ : Finset α
H : s✝.Nonempty
x : α
s : Finset αᵒᵈ
⊢ WithBot.map (⇑ofDual) s.max = s.inf (WithTop.some ∘ ⇑ofDual)
state_after: no goals
Theorem: Mathlib.Tactic.RingNF.int_rawCast_neg
File: Mathlib/Tactic/Ring/RingNF.lean

tactic: simp
state_before: R✝ : Type ?u.20430
inst✝¹ : CommSemiring R✝
n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ (Int.negOfNat n).rawCast = -n.rawCast
state_after: no goals
Theorem: DirichletCharacter.level_one'
File: Mathlib/NumberTheory/DirichletCharacter/Basic.lean

tactic: subst hn
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
n : ℕ
χ : DirichletCharacter R n
hn : n = 1
⊢ χ = 1
state_after: R : Type u_1
inst✝ : CommMonoidWithZero R
χ : DirichletCharacter R 1
⊢ χ = 1

tactic: exact level_one _
state_before: R : Type u_1
inst✝ : CommMonoidWithZero R
χ : DirichletCharacter R 1
⊢ χ = 1
state_after: no goals
Theorem: Finset.prod_nat_mod
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: rw [Finset.prod, Multiset.map_map]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
s : Finset α
n : ℕ
f : α → ℕ
⊢ (Multiset.map (fun x => x % n) (Multiset.map (fun i => f i) s.val)).prod % n = (∏ i ∈ s, f i % n) % n
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
s : Finset α
n : ℕ
f : α → ℕ
⊢ (Multiset.map ((fun x => x % n) ∘ fun i => f i) s.val).prod % n = (Multiset.map (fun i => f i % n) s.val).prod % n

tactic: rfl
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
s : Finset α
n : ℕ
f : α → ℕ
⊢ (Multiset.map ((fun x => x % n) ∘ fun i => f i) s.val).prod % n = (Multiset.map (fun i => f i % n) s.val).prod % n
state_after: no goals
Theorem: NumberField.Units.mem_torsion
File: Mathlib/NumberTheory/NumberField/Units/Basic.lean

tactic: rw [eq_iff_eq (x : K) 1, torsion, CommGroup.mem_torsion]
state_before: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
⊢ x ∈ torsion K ↔ ∀ (w : InfinitePlace K), w ((algebraMap (𝓞 K) K) ↑x) = 1
state_after: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
⊢ IsOfFinOrder x ↔ ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1

tactic: refine ⟨fun hx φ ↦ (((φ.comp $ algebraMap (𝓞 K) K).toMonoidHom.comp $
  Units.coeHom _).isOfFinOrder hx).norm_eq_one, fun h ↦ isOfFinOrder_iff_pow_eq_one.2 ?_⟩
state_before: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
⊢ IsOfFinOrder x ↔ ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
state_after: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1

tactic: obtain ⟨n, hn, hx⟩ := Embeddings.pow_eq_one_of_norm_eq_one K ℂ x.val.isIntegral_coe h
state_before: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1
state_after: case intro.intro
K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
n : ℕ
hn : 0 < n
hx : (algebraMap (𝓞 K) K) ↑x ^ n = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1

tactic: exact ⟨n, hn, by ext; rw [NumberField.RingOfIntegers.coe_eq_algebraMap, coe_pow, hx,
  NumberField.RingOfIntegers.coe_eq_algebraMap, coe_one]⟩
state_before: case intro.intro
K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
n : ℕ
hn : 0 < n
hx : (algebraMap (𝓞 K) K) ↑x ^ n = 1
⊢ ∃ n, 0 < n ∧ x ^ n = 1
state_after: no goals

tactic: ext
state_before: K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
n : ℕ
hn : 0 < n
hx : (algebraMap (𝓞 K) K) ↑x ^ n = 1
⊢ x ^ n = 1
state_after: case a.h
K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
n : ℕ
hn : 0 < n
hx : (algebraMap (𝓞 K) K) ↑x ^ n = 1
⊢ ↑↑(x ^ n) = ↑↑1

tactic: rw [NumberField.RingOfIntegers.coe_eq_algebraMap, coe_pow, hx,
NumberField.RingOfIntegers.coe_eq_algebraMap, coe_one]
state_before: case a.h
K : Type u_1
inst✝¹ : Field K
x : (𝓞 K)ˣ
inst✝ : NumberField K
h : ∀ (φ : K →+* ℂ), ‖φ ((algebraMap (𝓞 K) K) ↑x)‖ = 1
n : ℕ
hn : 0 < n
hx : (algebraMap (𝓞 K) K) ↑x ^ n = 1
⊢ ↑↑(x ^ n) = ↑↑1
state_after: no goals
Theorem: irrational_nat_mul_iff
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [← cast_natCast, irrational_rat_mul_iff, Nat.cast_ne_zero]
state_before: q : ℚ
m : ℤ
n : ℕ
x : ℝ
⊢ Irrational (↑n * x) ↔ n ≠ 0 ∧ Irrational x
state_after: no goals
Theorem: PrimeSpectrum.isBasis_basic_opens
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: unfold TopologicalSpace.Opens.IsBasis
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ TopologicalSpace.Opens.IsBasis (Set.range basicOpen)
state_after: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ TopologicalSpace.IsTopologicalBasis (SetLike.coe '' Set.range basicOpen)

tactic: convert isTopologicalBasis_basic_opens (R := R)
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ TopologicalSpace.IsTopologicalBasis (SetLike.coe '' Set.range basicOpen)
state_after: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ SetLike.coe '' Set.range basicOpen = Set.range fun r => ↑(basicOpen r)

tactic: rw [← Set.range_comp]
state_before: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ SetLike.coe '' Set.range basicOpen = Set.range fun r => ↑(basicOpen r)
state_after: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ Set.range (SetLike.coe ∘ basicOpen) = Set.range fun r => ↑(basicOpen r)

tactic: rfl
state_before: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
⊢ Set.range (SetLike.coe ∘ basicOpen) = Set.range fun r => ↑(basicOpen r)
state_after: no goals