1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Algebra.smul_leftMulMatrix
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: simp only [leftMulMatrix_apply, LinearMap.toMatrix_apply, mul_comm, Basis.smul_apply,
  Basis.smul_repr, Finsupp.smul_apply, id.smul_eq_mul, LinearEquiv.map_smul, mul_smul_comm,
  coe_lmul_eq_mul, LinearMap.mul_apply']
state_before: R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Ring T
inst✝⁷ : Algebra R S
inst✝⁶ : Algebra S T
inst✝⁵ : Algebra R T
inst✝⁴ : IsScalarTower R S T
m : Type u_4
n : Type u_5
inst✝³ : Fintype m
inst✝² : Fintype n
inst✝¹ : DecidableEq m
inst✝ : DecidableEq n
b : Basis m R S
c : Basis n S T
x : T
ik jk : m × n
⊢ (leftMulMatrix (b.smul c)) x ik jk = (leftMulMatrix b) ((leftMulMatrix c) x ik.2 jk.2) ik.1 jk.1
state_after: no goals
Theorem: RingQuot.Rel.sub_left
File: Mathlib/Algebra/RingQuot.lean

tactic: simp only [sub_eq_add_neg, h.add_left]
state_before: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b c : R
h : Rel r a b
⊢ Rel r (a - c) (b - c)
state_after: no goals
Theorem: Set.compl_cIoo
File: Mathlib/Order/Circular.lean

tactic: ext
state_before: α : Type u_1
inst✝ : CircularOrder α
a b : α
⊢ (cIoo a b)ᶜ = cIcc b a
state_after: case h
α : Type u_1
inst✝ : CircularOrder α
a b x✝ : α
⊢ x✝ ∈ (cIoo a b)ᶜ ↔ x✝ ∈ cIcc b a

tactic: rw [Set.mem_cIcc, btw_iff_not_sbtw, cIoo, mem_compl_iff, mem_setOf]
state_before: case h
α : Type u_1
inst✝ : CircularOrder α
a b x✝ : α
⊢ x✝ ∈ (cIoo a b)ᶜ ↔ x✝ ∈ cIcc b a
state_after: no goals
Theorem: Substring.ValidFor.nextn_stop
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [Substring.nextn, h.next_stop, h.nextn_stop n]
state_before: l m r : List Char
x✝ : Substring
h : ValidFor l m r x✝
n : Nat
⊢ x✝.nextn (n + 1) { byteIdx := utf8Len m } = { byteIdx := utf8Len m }
state_after: no goals
Theorem: Path.Homotopy.continuous_reflTransSymmAux
File: Mathlib/AlgebraicTopology/FundamentalGroupoid/Basic.lean

tactic: refine continuous_if_le ?_ ?_ (Continuous.continuousOn ?_) (Continuous.continuousOn ?_) ?_
state_before: X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous reflTransSymmAux
state_after: case refine_1
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.2

case refine_2
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => 1 / 2

case refine_3
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.1 * 2 * ↑x.2

case refine_4
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)

case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)

tactic: intro x hx
state_before: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ ∀ (x : ↑I × ↑I), ↑x.2 = 1 / 2 → ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)
state_after: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
x : ↑I × ↑I
hx : ↑x.2 = 1 / 2
⊢ ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)

tactic: norm_num [hx, mul_assoc]
state_before: case refine_5
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
x : ↑I × ↑I
hx : ↑x.2 = 1 / 2
⊢ ↑x.1 * 2 * ↑x.2 = ↑x.1 * (2 - 2 * ↑x.2)
state_after: no goals

tactic: continuity
state_before: case refine_1
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.2
state_after: no goals

tactic: continuity
state_before: case refine_2
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => 1 / 2
state_after: no goals

tactic: continuity
state_before: case refine_3
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.1 * 2 * ↑x.2
state_after: no goals

tactic: continuity
state_before: case refine_4
X : Type u
Y : Type v
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x₀ x₁ : X
⊢ Continuous fun x => ↑x.1 * (2 - 2 * ↑x.2)
state_after: no goals
Theorem: FreeMonoid.countP_of
File: Mathlib/Algebra/FreeMonoid/Count.lean

tactic: rw [countP_of', ofAdd_zero]
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
⊢ (countP p) (of x) = if p x then Multiplicative.ofAdd 1 else 1
state_after: no goals
Theorem: ENNReal.iInter_Ioi_coe_nat
File: Mathlib/Data/ENNReal/Basic.lean

tactic: simp only [← compl_Iic, ← compl_iUnion, iUnion_Iic_coe_nat, compl_compl]
state_before: α : Type u_1
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ ⋂ n, Ioi ↑n = {⊤}
state_after: no goals
Theorem: isLUB_ciSup_set
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: rw [← sSup_image']
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLattice α
s✝ t : Set α
a b : α
f : β → α
s : Set β
H : BddAbove (f '' s)
Hne : s.Nonempty
⊢ IsLUB (f '' s) (⨆ i, f ↑i)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLattice α
s✝ t : Set α
a b : α
f : β → α
s : Set β
H : BddAbove (f '' s)
Hne : s.Nonempty
⊢ IsLUB (f '' s) (sSup (f '' s))

tactic: exact isLUB_csSup (Hne.image _) H
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLattice α
s✝ t : Set α
a b : α
f : β → α
s : Set β
H : BddAbove (f '' s)
Hne : s.Nonempty
⊢ IsLUB (f '' s) (sSup (f '' s))
state_after: no goals
Theorem: Nat.factorization_eq_factors_multiset
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: ext p
state_before: a b m n✝ p n : ℕ
⊢ n.factorization = Multiset.toFinsupp ↑n.factors
state_after: case h
a b m n✝ p✝ n p : ℕ
⊢ n.factorization p = (Multiset.toFinsupp ↑n.factors) p

tactic: simp
state_before: case h
a b m n✝ p✝ n p : ℕ
⊢ n.factorization p = (Multiset.toFinsupp ↑n.factors) p
state_after: no goals
Theorem: FiniteDimensional.finrank_matrix
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

tactic: simp [finrank]
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝¹⁴ : Ring R
inst✝¹³ : CommRing S
inst✝¹² : AddCommGroup M
inst✝¹¹ : AddCommGroup M'
inst✝¹⁰ : AddCommGroup M₁
inst✝⁹ : Module R M
inst✝⁸ : Module R M'
inst✝⁷ : Module R M₁
inst✝⁶ : StrongRankCondition R
inst✝⁵ : Module.Free R M
inst✝⁴ : Module.Free R M'
inst✝³ : Module.Finite R M
inst✝² : Module.Finite R M'
m : Type u_2
n : Type u_3
inst✝¹ : Fintype m
inst✝ : Fintype n
⊢ finrank R (Matrix m n R) = card m * card n
state_after: no goals
Theorem: Function.Surjective.lieAlgebra_isNilpotent
File: Mathlib/Algebra/Lie/Nilpotent.lean

tactic: obtain ⟨k, hk⟩ := id h₁
state_before: R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
⊢ ∃ k, lowerCentralSeries R L' L' k = ⊥
state_after: case mk.intro
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ ∃ k, lowerCentralSeries R L' L' k = ⊥

tactic: use k
state_before: case mk.intro
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ ∃ k, lowerCentralSeries R L' L' k = ⊥
state_after: case h
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ lowerCentralSeries R L' L' k = ⊥

tactic: rw [← LieIdeal.lowerCentralSeries_map_eq k h₂, hk]
state_before: case h
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ lowerCentralSeries R L' L' k = ⊥
state_after: case h
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ LieIdeal.map f ⊥ = ⊥

tactic: simp only [LieIdeal.map_eq_bot_iff, bot_le]
state_before: case h
R : Type u
L : Type v
L' : Type w
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
h₁ : LieAlgebra.IsNilpotent R L
f : L →ₗ⁅R⁆ L'
h₂ : Surjective ⇑f
k : ℕ
hk : lowerCentralSeries R L L k = ⊥
⊢ LieIdeal.map f ⊥ = ⊥
state_after: no goals
Theorem: Set.mk_preimage_prod_right_fn_eq_if
File: Mathlib/Data/Set/Prod.lean

tactic: rw [← mk_preimage_prod_right_eq_if, prod_preimage_right, preimage_preimage]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝ : DecidablePred fun x => x ∈ s
g : δ → β
⊢ (fun b => (a, g b)) ⁻¹' s ×ˢ t = if a ∈ s then g ⁻¹' t else ∅
state_after: no goals
Theorem: Set.comp_mulIndicator
File: Mathlib/Algebra/Group/Indicator.lean

tactic: convert s.apply_piecewise f (const α 1) (fun _ => h) (x := x) using 2
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝² : One M
inst✝¹ : One N
s✝ t : Set α
f✝ g : α → M
a : α
h : M → β
f : α → M
s : Set α
x : α
inst✝ : DecidablePred fun x => x ∈ s
this : DecidablePred fun x => x ∈ s := Classical.decPred fun x => x ∈ s
⊢ h (s.mulIndicator f x) = s.piecewise (h ∘ f) (const α (h 1)) x
state_after: no goals
Theorem: CauchyFilter.extend_pureCauchy
File: Mathlib/Topology/UniformSpace/Completion.lean

tactic: rw [extend, if_pos hf]
state_before: α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : T0Space β
f : α → β
hf : UniformContinuous f
a : α
⊢ extend f (pureCauchy a) = f a
state_after: α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : T0Space β
f : α → β
hf : UniformContinuous f
a : α
⊢ ⋯.extend f (pureCauchy a) = f a

tactic: exact uniformly_extend_of_ind uniformInducing_pureCauchy denseRange_pureCauchy hf _
state_before: α : Type u
inst✝³ : UniformSpace α
β : Type v
γ : Type w
inst✝² : UniformSpace β
inst✝¹ : UniformSpace γ
inst✝ : T0Space β
f : α → β
hf : UniformContinuous f
a : α
⊢ ⋯.extend f (pureCauchy a) = f a
state_after: no goals
Theorem: Finset.max_eq_top
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝¹ : LinearOrder α
inst✝ : OrderTop α
s : Finset α
⊢ (∃ b ∈ s, ↑b = ⊤) ↔ ⊤ ∈ s
state_after: no goals
Theorem: Set.ordConnected_of_uIcc_subset_left
File: Mathlib/Order/Interval/Set/OrdConnected.lean

tactic: rw [uIcc_comm]
state_before: α : Type u_1
inst✝ : LinearOrder α
s : Set α
x : α
h : ∀ y ∈ s, [[x, y]] ⊆ s
y : α
hy : y ∈ s
z : α
hz : z ∈ s
⊢ [[y, x]] ∪ [[x, z]] = [[x, y]] ∪ [[x, z]]
state_after: no goals
Theorem: IsPreconnected.eq_univ_of_unbounded
File: Mathlib/Topology/Order/IntermediateValue.lean

tactic: refine eq_univ_of_forall fun x => ?_
state_before: X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
⊢ s = univ
state_after: X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x : α
⊢ x ∈ s

tactic: obtain ⟨y, ys, hy⟩ : ∃ y ∈ s, y < x := not_bddBelow_iff.1 hb x
state_before: X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x : α
⊢ x ∈ s
state_after: case intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
⊢ x ∈ s

tactic: obtain ⟨z, zs, hz⟩ : ∃ z ∈ s, x < z := not_bddAbove_iff.1 ha x
state_before: case intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
⊢ x ∈ s
state_after: case intro.intro.intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
z : α
zs : z ∈ s
hz : x < z
⊢ x ∈ s

tactic: exact hs.Icc_subset ys zs ⟨le_of_lt hy, le_of_lt hz⟩
state_before: case intro.intro.intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
z : α
zs : z ∈ s
hz : x < z
⊢ x ∈ s
state_after: no goals
Theorem: Set.ncard_inter_add_ncard_diff_eq_ncard
File: Mathlib/Data/Set/Card.lean

tactic: rw [← ncard_union_eq (disjoint_of_subset_left inter_subset_right disjoint_sdiff_right)
  (hs.inter_of_left _) (hs.diff _), union_comm, diff_union_inter]
state_before: α : Type u_1
β : Type u_2
s✝ t✝ : Set α
f : α → β
s t : Set α
hs : autoParam s.Finite _auto✝
⊢ (s ∩ t).ncard + (s \ t).ncard = s.ncard
state_after: no goals
Theorem: SimpleGraph.aux
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Removal.lean

tactic: rw [mul_assoc, two_mul, ← add_lt_add_iff_right (n % k), add_right_comm, add_assoc,
  mod_add_div n k, add_comm, add_lt_add_iff_right]
state_before: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Fintype α
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
s t : Finset α
P : Finpartition univ
ε : ℝ
n k : ℕ
hk : 0 < k
hn : k ≤ n
⊢ n < 2 * k * (n / k)
state_after: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Fintype α
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
s t : Finset α
P : Finpartition univ
ε : ℝ
n k : ℕ
hk : 0 < k
hn : k ≤ n
⊢ n % k < k * (n / k)

tactic: apply (mod_lt n hk).trans_le
state_before: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Fintype α
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
s t : Finset α
P : Finpartition univ
ε : ℝ
n k : ℕ
hk : 0 < k
hn : k ≤ n
⊢ n % k < k * (n / k)
state_after: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Fintype α
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
s t : Finset α
P : Finpartition univ
ε : ℝ
n k : ℕ
hk : 0 < k
hn : k ≤ n
⊢ k ≤ k * (n / k)

tactic: simpa using Nat.mul_le_mul_left k ((Nat.one_le_div_iff hk).2 hn)
state_before: α : Type u_1
inst✝² : DecidableEq α
inst✝¹ : Fintype α
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
s t : Finset α
P : Finpartition univ
ε : ℝ
n k : ℕ
hk : 0 < k
hn : k ≤ n
⊢ k ≤ k * (n / k)
state_after: no goals
Theorem: Mathlib.Meta.NormNum.isNat_minFac_3
File: Mathlib/Tactic/NormNum/Prime.lean

tactic: rw [eq_comm, ← Nat.dvd_iff_mod_eq_zero] at h2
state_before: n k : ℕ
h1 : MinFacHelper n k
h2 : 0 = n % k
⊢ IsNat n.minFac k
state_after: n k : ℕ
h1 : MinFacHelper n k
h2 : k ∣ n
⊢ IsNat n.minFac k

tactic: exact ⟨le_antisymm (minFac_le_of_dvd h1.1.le h2) h1.2.2⟩
state_before: n k : ℕ
h1 : MinFacHelper n k
h2 : k ∣ n
⊢ IsNat n.minFac k
state_after: no goals
Theorem: MeasureTheory.Measure.rnDeriv_pos'
File: Mathlib/MeasureTheory/Decomposition/RadonNikodym.lean

tactic: refine (absolutelyContinuous_withDensity_rnDeriv hμν).ae_le ?_
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
⊢ ∀ᵐ (x : α) ∂μ, 0 < ν.rnDeriv μ x
state_after: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
⊢ {x | (fun x => 0 < ν.rnDeriv μ x) x} ∈ ae (μ.withDensity (ν.rnDeriv μ))

tactic: filter_upwards [Measure.rnDeriv_pos (withDensity_absolutelyContinuous μ (ν.rnDeriv μ)),
  (withDensity_absolutelyContinuous μ (ν.rnDeriv μ)).ae_le
  (Measure.rnDeriv_withDensity μ (Measure.measurable_rnDeriv ν μ))] with x hx hx2
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
⊢ {x | (fun x => 0 < ν.rnDeriv μ x) x} ∈ ae (μ.withDensity (ν.rnDeriv μ))
state_after: case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
x : α
hx : 0 < (μ.withDensity (ν.rnDeriv μ)).rnDeriv μ x
hx2 : (μ.withDensity (ν.rnDeriv μ)).rnDeriv μ x = ν.rnDeriv μ x
⊢ 0 < ν.rnDeriv μ x

tactic: rwa [← hx2]
state_before: case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : SigmaFinite μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
x : α
hx : 0 < (μ.withDensity (ν.rnDeriv μ)).rnDeriv μ x
hx2 : (μ.withDensity (ν.rnDeriv μ)).rnDeriv μ x = ν.rnDeriv μ x
⊢ 0 < ν.rnDeriv μ x
state_after: no goals
Theorem: Multiset.count_sum
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a✝ : α
s t : Multiset α
f✝ g : α → Multiset β
inst✝ : DecidableEq α
m : Multiset β
f : β → Multiset α
a : α
⊢ count a (map f 0).sum = (map (fun b => count a (f b)) 0).sum
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type v
γ : Type u_2
δ : Type u_3
a✝ : α
s t : Multiset α
f✝ g : α → Multiset β
inst✝ : DecidableEq α
m : Multiset β
f : β → Multiset α
a : α
⊢ ∀ (a_1 : β) (s : Multiset β),
    count a (map f s).sum = (map (fun b => count a (f b)) s).sum →
      count a (map f (a_1 ::ₘ s)).sum = (map (fun b => count a (f b)) (a_1 ::ₘ s)).sum
state_after: no goals
Theorem: Real.measurable_of_measurable_exp
File: Mathlib/MeasureTheory/Function/SpecialFunctions/Basic.lean

tactic: have : f = fun x ↦ log (exp (f x)) := by ext; rw [log_exp]
state_before: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
⊢ Measurable f
state_after: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
this : f = fun x => log (rexp (f x))
⊢ Measurable f

tactic: rw [this]
state_before: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
this : f = fun x => log (rexp (f x))
⊢ Measurable f
state_after: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
this : f = fun x => log (rexp (f x))
⊢ Measurable fun x => log (rexp (f x))

tactic: exact measurable_log.comp hf
state_before: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
this : f = fun x => log (rexp (f x))
⊢ Measurable fun x => log (rexp (f x))
state_after: no goals

tactic: ext
state_before: α : Type u_1
x✝ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
⊢ f = fun x => log (rexp (f x))
state_after: case h
α : Type u_1
x✝¹ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
x✝ : α
⊢ f x✝ = log (rexp (f x✝))

tactic: rw [log_exp]
state_before: case h
α : Type u_1
x✝¹ : MeasurableSpace α
f : α → ℝ
hf : Measurable fun x => rexp (f x)
x✝ : α
⊢ f x✝ = log (rexp (f x✝))
state_after: no goals
Theorem: Finset.toList_toFinset
File: Mathlib/Data/Finset/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s : Finset α
⊢ s.toList.toFinset = s
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s : Finset α
a✝ : α
⊢ a✝ ∈ s.toList.toFinset ↔ a✝ ∈ s

tactic: simp
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s : Finset α
a✝ : α
⊢ a✝ ∈ s.toList.toFinset ↔ a✝ ∈ s
state_after: no goals
Theorem: Finset.not_nontrivial_singleton
File: Mathlib/Data/Finset/Basic.lean

tactic: simp [Finset.Nontrivial]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
a b : α
⊢ ¬{a}.Nontrivial
state_after: no goals
Theorem: CategoryTheory.StructuredArrow.IsUniversal.hom_ext
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

tactic: rw [h.hom_desc η, h.hom_desc η', w]
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
A : Type u₃
inst✝¹ : Category.{v₃, u₃} A
B : Type u₄
inst✝ : Category.{v₄, u₄} B
f g : StructuredArrow S T
h : f.IsUniversal
c : C
η η' : f.right ⟶ c
w : f.hom ≫ T.map η = f.hom ≫ T.map η'
⊢ η = η'
state_after: no goals
Theorem: orderOf_inv
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: simp [orderOf_eq_orderOf_iff]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Group G
x✝ y : G
i : ℤ
x : G
⊢ orderOf x⁻¹ = orderOf x
state_after: no goals
Theorem: Tactic.NormNum.nat_gcd_helper_2
File: Mathlib/Tactic/NormNum/GCD.lean

tactic: rw [← Int.gcd_natCast_natCast]
state_before: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ x.gcd y = d
state_after: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ (↑x).gcd ↑y = d

tactic: apply int_gcd_helper' a (-b)
  (Int.natCast_dvd_natCast.mpr (Nat.dvd_of_mod_eq_zero hu))
  (Int.natCast_dvd_natCast.mpr (Nat.dvd_of_mod_eq_zero hv))
state_before: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ (↑x).gcd ↑y = d
state_after: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ ↑x * ↑a + ↑y * -↑b = ↑d

tactic: rw [mul_neg, ← sub_eq_add_neg, sub_eq_iff_eq_add']
state_before: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ ↑x * ↑a + ↑y * -↑b = ↑d
state_after: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ ↑x * ↑a = ↑y * ↑b + ↑d

tactic: exact mod_cast h
state_before: d x y a b : ℕ
hu : x % d = 0
hv : y % d = 0
h : x * a = y * b + d
⊢ ↑x * ↑a = ↑y * ↑b + ↑d
state_after: no goals
Theorem: Set.inter_nonempty_iff_exists_left
File: Mathlib/Data/Set/Basic.lean

tactic: simp_rw [inter_nonempty]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
⊢ (s ∩ t).Nonempty ↔ ∃ x ∈ s, x ∈ t
state_after: no goals
Theorem: CategoryTheory.Functor.map_comp_heq
File: Mathlib/CategoryTheory/EqToHom.lean

tactic: rw [F.map_comp, G.map_comp]
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
β : Sort u_1
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
hx : F.obj X = G.obj X
hy : F.obj Y = G.obj Y
hz : F.obj Z = G.obj Z
hf : HEq (F.map f) (G.map f)
hg : HEq (F.map g) (G.map g)
⊢ HEq (F.map (f ≫ g)) (G.map (f ≫ g))
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
β : Sort u_1
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
hx : F.obj X = G.obj X
hy : F.obj Y = G.obj Y
hz : F.obj Z = G.obj Z
hf : HEq (F.map f) (G.map f)
hg : HEq (F.map g) (G.map g)
⊢ HEq (F.map f ≫ F.map g) (G.map f ≫ G.map g)

tactic: congr
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
β : Sort u_1
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G : C ⥤ D
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
hx : F.obj X = G.obj X
hy : F.obj Y = G.obj Y
hz : F.obj Z = G.obj Z
hf : HEq (F.map f) (G.map f)
hg : HEq (F.map g) (G.map g)
⊢ HEq (F.map f ≫ F.map g) (G.map f ≫ G.map g)
state_after: no goals