tasksource/leandojo huggingface dataset:
Theorem: continuous_if_le
File: Mathlib/Topology/Order/Basic.lean

tactic: refine' continuous_if (fun a ha => hfg _ (frontier_le_subset_eq hf hg ha)) _ (hg'.mono _)
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : OrderClosedTopology α
f g : β → α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : (x : β) → Decidable (f x ≤ g x)
f' g' : β → γ
hf : Continuous f
hg : Continuous g
hf' : ContinuousOn f' {x | f x ≤ g x}
hg' : ContinuousOn g' {x | g x ≤ f x}
hfg : ∀ (x : β), f x = g x → f' x = g' x
⊢ Continuous fun x => if f x ≤ g x then f' x else g' x

tactic: rwa [(isClosed_le hf hg).closure_eq]
state_before: case refine'_1
α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : OrderClosedTopology α
f g : β → α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : (x : β) → Decidable (f x ≤ g x)
f' g' : β → γ
hf : Continuous f
hg : Continuous g
hf' : ContinuousOn f' {x | f x ≤ g x}
hg' : ContinuousOn g' {x | g x ≤ f x}
hfg : ∀ (x : β), f x = g x → f' x = g' x
⊢ ContinuousOn (fun x => f' x) (closure {x | f x ≤ g x})

tactic: simp only [not_le]
state_before: case refine'_2
α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : OrderClosedTopology α
f g : β → α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : (x : β) → Decidable (f x ≤ g x)
f' g' : β → γ
hf : Continuous f
hg : Continuous g
hf' : ContinuousOn f' {x | f x ≤ g x}
hg' : ContinuousOn g' {x | g x ≤ f x}
hfg : ∀ (x : β), f x = g x → f' x = g' x
⊢ closure {x | ¬f x ≤ g x} ⊆ {x | g x ≤ f x}

tactic: exact closure_lt_subset_le hg hf
state_before: case refine'_2
α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : OrderClosedTopology α
f g : β → α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : (x : β) → Decidable (f x ≤ g x)
f' g' : β → γ
hf : Continuous f
hg : Continuous g
hf' : ContinuousOn f' {x | f x ≤ g x}
hg' : ContinuousOn g' {x | g x ≤ f x}
hfg : ∀ (x : β), f x = g x → f' x = g' x
⊢ closure {x | g x < f x} ⊆ {x | g x ≤ f x}
Theorem: FractionalIdeal.coe_inv_of_nonzero
File: Mathlib/RingTheory/DedekindDomain/Ideal.lean

tactic: rw [inv_nonzero]
state_before: R : Type ?u.9393
A : Type ?u.9396
K : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
R₁ : Type u_1
inst✝³ : CommRing R₁
inst✝² : IsDomain R₁
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
I J✝ J : FractionalIdeal R₁⁰ K
h : J ≠ 0
⊢ ↑J⁻¹ = IsLocalization.coeSubmodule K ⊤ / ↑J

tactic: rfl
state_before: R : Type ?u.9393
A : Type ?u.9396
K : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
R₁ : Type u_1
inst✝³ : CommRing R₁
inst✝² : IsDomain R₁
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
I J✝ J : FractionalIdeal R₁⁰ K
h : J ≠ 0
⊢ ↑{ val := ↑1 / ↑J, property := (_ : IsFractional R₁⁰ (↑1 / ↑J)) } = IsLocalization.coeSubmodule K ⊤ / ↑J

case h
R : Type ?u.9393
A : Type ?u.9396
K : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
R₁ : Type u_1
inst✝³ : CommRing R₁
inst✝² : IsDomain R₁
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
I J✝ J : FractionalIdeal R₁⁰ K
h : J ≠ 0
⊢ J ≠ 0

tactic: assumption
state_before: case h
R : Type ?u.9393
A : Type ?u.9396
K : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Field K
inst✝⁴ : IsDomain A
R₁ : Type u_1
inst✝³ : CommRing R₁
inst✝² : IsDomain R₁
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
I J✝ J : FractionalIdeal R₁⁰ K
h : J ≠ 0
⊢ J ≠ 0
Theorem: LinearMap.mulLeft_one
File: Mathlib/Algebra/Algebra/Bilinear.lean

tactic: ext
state_before: R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
⊢ mulLeft R 1 = id

tactic: simp only [LinearMap.id_coe, one_mul, id.def, mulLeft_apply]
state_before: case h
R : Type u_2
A : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
x✝ : A
⊢ ↑(mulLeft R 1) x✝ = ↑id x✝
Theorem: gauge_neg
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: have : ∀ x, -x ∈ s ↔ x ∈ s := fun x => ⟨fun h => by simpa using symmetric _ h, symmetric x⟩
state_before: 𝕜 : Type ?u.36600
E : Type u_1
F : Type ?u.36606
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
symmetric : ∀ (x : E), x ∈ s → -x ∈ s
x : E
⊢ gauge s (-x) = gauge s x

tactic: simp_rw [gauge_def', smul_neg, this]
state_before: 𝕜 : Type ?u.36600
E : Type u_1
F : Type ?u.36606
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
symmetric : ∀ (x : E), x ∈ s → -x ∈ s
x : E
this : ∀ (x : E), -x ∈ s ↔ x ∈ s
⊢ gauge s (-x) = gauge s x

tactic: simpa using symmetric _ h
state_before: 𝕜 : Type ?u.36600
E : Type u_1
F : Type ?u.36606
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
symmetric : ∀ (x : E), x ∈ s → -x ∈ s
x✝ x : E
h : -x ∈ s
⊢ x ∈ s
Theorem: Nat.multichoose_zero_succ
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: simp [multichoose]
state_before: k : ℕ
⊢ multichoose 0 (k + 1) = 0
Theorem: Hyperreal.isSt_trans_real
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [isSt_real_iff_eq, isSt_real_iff_eq, isSt_real_iff_eq]
state_before: r s t : ℝ
⊢ IsSt (↑r) s → IsSt (↑s) t → IsSt (↑r) t

tactic: exact Eq.trans
state_before: r s t : ℝ
⊢ r = s → s = t → r = t
Theorem: invOf_lt_zero
File: Mathlib/Algebra/Order/Invertible.lean

tactic: simp only [← not_le, invOf_nonneg]
state_before: α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ ⅟a < 0 ↔ a < 0
Theorem: div_lt_iff_of_neg'
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [mul_comm, div_lt_iff_of_neg hc]
state_before: ι : Type ?u.147504
α : Type u_1
β : Type ?u.147510
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hc : c < 0
⊢ b / c < a ↔ c * a < b
Theorem: spanPoints_nonempty
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: constructor
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
⊢ Set.Nonempty (spanPoints k s) ↔ Set.Nonempty s

tactic: contrapose
state_before: case mp
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
⊢ Set.Nonempty (spanPoints k s) → Set.Nonempty s

tactic: rw [Set.not_nonempty_iff_eq_empty, Set.not_nonempty_iff_eq_empty]
state_before: case mp
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
⊢ ¬Set.Nonempty s → ¬Set.Nonempty (spanPoints k s)

tactic: intro h
state_before: case mp
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
⊢ s = ∅ → spanPoints k s = ∅

tactic: simp [h, spanPoints]
state_before: case mp
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
h : s = ∅
⊢ spanPoints k s = ∅

tactic: exact fun h => h.mono (subset_spanPoints _ _)
state_before: case mpr
k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
⊢ Set.Nonempty s → Set.Nonempty (spanPoints k s)
Theorem: Finset.coe_infsep_of_offDiag_nonempty
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: rw [Finset.coe_infsep, dif_pos hs]
state_before: α : Type u_1
β : Type ?u.76474
inst✝¹ : PseudoMetricSpace α
x y z : α
s✝ t : Set α
inst✝ : DecidableEq α
s : Finset α
hs : Finset.Nonempty (Finset.offDiag s)
⊢ infsep ↑s = Finset.inf' (Finset.offDiag s) hs (uncurry dist)
Theorem: Fin.prod_const
File: Mathlib/Algebra/BigOperators/Fin.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.45008
inst✝ : CommMonoid α
n : ℕ
x : α
⊢ ∏ _i : Fin n, x = x ^ n
Theorem: codisjoint_hnot_hnot_left_iff
File: Mathlib/Order/Heyting/Basic.lean

tactic: simp_rw [← hnot_le_iff_codisjoint_right, hnot_hnot_hnot]
state_before: ι : Type ?u.177652
α : Type u_1
β : Type ?u.177658
inst✝ : CoheytingAlgebra α
a b c : α
⊢ Codisjoint (￢￢a) b ↔ Codisjoint a b
Theorem: Finset.prod_erase
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [← sdiff_singleton_eq_erase]
state_before: ι : Type ?u.797166
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset α
f : α → β
a : α
h : f a = 1
⊢ ∏ x in erase s a, f x = ∏ x in s, f x

tactic: refine' prod_subset (sdiff_subset _ _) fun x hx hnx => _
state_before: ι : Type ?u.797166
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset α
f : α → β
a : α
h : f a = 1
⊢ ∏ x in s \ {a}, f x = ∏ x in s, f x

tactic: rw [sdiff_singleton_eq_erase] at hnx
state_before: ι : Type ?u.797166
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset α
f : α → β
a : α
h : f a = 1
x : α
hx : x ∈ s
hnx : ¬x ∈ s \ {a}
⊢ f x = 1

tactic: rwa [eq_of_mem_of_not_mem_erase hx hnx]
state_before: ι : Type ?u.797166
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset α
f : α → β
a : α
h : f a = 1
x : α
hx : x ∈ s
hnx : ¬x ∈ erase s a
⊢ f x = 1
Theorem: lie_mem_left
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [← lie_skew, ← neg_lie]
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
I : LieIdeal R L
x y : L
h : x ∈ I
⊢ ⁅x, y⁆ ∈ I

tactic: apply lie_mem_right
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
I : LieIdeal R L
x y : L
h : x ∈ I
⊢ ⁅-y, x⁆ ∈ I

tactic: assumption
state_before: case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
I : LieIdeal R L
x y : L
h : x ∈ I
⊢ x ∈ I
Theorem: lowerCentralSeries_prod
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: induction' n with n ih
state_before: G : Type ?u.325527
inst✝³ : Group G
H : Subgroup G
inst✝² : Normal H
G₁ : Type u_1
G₂ : Type u_2
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
⊢ lowerCentralSeries (G₁ × G₂) n = prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n)

tactic: simp
state_before: case zero
G : Type ?u.325527
inst✝³ : Group G
H : Subgroup G
inst✝² : Normal H
G₁ : Type u_1
G₂ : Type u_2
inst✝¹ : Group G₁
inst✝ : Group G₂
⊢ lowerCentralSeries (G₁ × G₂) Nat.zero = prod (lowerCentralSeries G₁ Nat.zero) (lowerCentralSeries G₂ Nat.zero)

tactic: calc
  lowerCentralSeries (G₁ × G₂) n.succ = ⁅lowerCentralSeries (G₁ × G₂) n, ⊤⁆ := rfl
  _ = ⁅(lowerCentralSeries G₁ n).prod (lowerCentralSeries G₂ n), ⊤⁆ := by rw [ih]
  _ = ⁅(lowerCentralSeries G₁ n).prod (lowerCentralSeries G₂ n), (⊤ : Subgroup G₁).prod ⊤⁆ :=
    by simp
  _ = ⁅lowerCentralSeries G₁ n, (⊤ : Subgroup G₁)⁆.prod ⁅lowerCentralSeries G₂ n, ⊤⁆ :=
    (commutator_prod_prod _ _ _ _)
  _ = (lowerCentralSeries G₁ n.succ).prod (lowerCentralSeries G₂ n.succ) := rfl
state_before: case succ
G : Type ?u.325527
inst✝³ : Group G
H : Subgroup G
inst✝² : Normal H
G₁ : Type u_1
G₂ : Type u_2
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
ih : lowerCentralSeries (G₁ × G₂) n = prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n)
⊢ lowerCentralSeries (G₁ × G₂) (Nat.succ n) =
    prod (lowerCentralSeries G₁ (Nat.succ n)) (lowerCentralSeries G₂ (Nat.succ n))

tactic: rw [ih]
state_before: G : Type ?u.325527
inst✝³ : Group G
H : Subgroup G
inst✝² : Normal H
G₁ : Type u_1
G₂ : Type u_2
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
ih : lowerCentralSeries (G₁ × G₂) n = prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n)
⊢ ⁅lowerCentralSeries (G₁ × G₂) n, ⊤⁆ = ⁅prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n), ⊤⁆

tactic: simp
state_before: G : Type ?u.325527
inst✝³ : Group G
H : Subgroup G
inst✝² : Normal H
G₁ : Type u_1
G₂ : Type u_2
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
ih : lowerCentralSeries (G₁ × G₂) n = prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n)
⊢ ⁅prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n), ⊤⁆ =
    ⁅prod (lowerCentralSeries G₁ n) (lowerCentralSeries G₂ n), prod ⊤ ⊤⁆
Theorem: LieSubalgebra.isNilpotent_ad_of_isNilpotent_ad
File: Mathlib/Algebra/Lie/Nilpotent.lean

tactic: obtain ⟨n, hn⟩ := h
state_before: R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Algebra R A
L : Type v
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
K : LieSubalgebra R L
x : { x // x ∈ K }
h : IsNilpotent (↑(LieAlgebra.ad R L) ↑x)
⊢ IsNilpotent (↑(LieAlgebra.ad R { x // x ∈ K }) x)

tactic: use n
state_before: case intro
R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Algebra R A
L : Type v
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
K : LieSubalgebra R L
x : { x // x ∈ K }
n : ℕ
hn : ↑(LieAlgebra.ad R L) ↑x ^ n = 0
⊢ IsNilpotent (↑(LieAlgebra.ad R { x // x ∈ K }) x)

tactic: exact LinearMap.submodule_pow_eq_zero_of_pow_eq_zero (K.ad_comp_incl_eq x) hn
state_before: case intro
R : Type u
A : Type v
inst✝⁴ : CommRing R
inst✝³ : Ring A
inst✝² : Algebra R A
L : Type v
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
K : LieSubalgebra R L
x : { x // x ∈ K }
n : ℕ
hn : ↑(LieAlgebra.ad R L) ↑x ^ n = 0
⊢ ↑(LieAlgebra.ad R { x // x ∈ K }) x ^ n = 0
Theorem: Char.sizeOf
File: src/lean/Init/SizeOfLemmas.lean

tactic: cases a
state_before: a : Char
⊢ SizeOf.sizeOf a = toNat a + 3

tactic: simp_arith [Char.toNat]
state_before: case mk
val✝ : UInt32
valid✝ : UInt32.isValidChar val✝
⊢ SizeOf.sizeOf { val := val✝, valid := valid✝ } = toNat { val := val✝, valid := valid✝ } + 3
Theorem: measurable_derivWithin_Ici
File: Mathlib/Analysis/Calculus/FDerivMeasurable.lean

tactic: refine' measurable_of_isClosed fun s hs => _
state_before: F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝² : CompleteSpace F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
⊢ Measurable fun x => derivWithin f (Ici x) x

tactic: have :
  (fun x => derivWithin f (Ici x) x) ⁻¹' s =
    { x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ s } ∪
      { x | ¬DifferentiableWithinAt ℝ f (Ici x) x } ∩ { _x | (0 : F) ∈ s } :=
  Set.ext fun x => mem_preimage.trans derivWithin_mem_iff
state_before: F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝² : CompleteSpace F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
s : Set ((fun x => F) 1)
hs : IsClosed s
⊢ MeasurableSet ((fun x => derivWithin f (Ici x) x) ⁻¹' s)

tactic: rw [this]
state_before: F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝² : CompleteSpace F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
s : Set ((fun x => F) 1)
hs : IsClosed s
this :
  (fun x => derivWithin f (Ici x) x) ⁻¹' s =
    {x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ s} ∪
      {x | ¬DifferentiableWithinAt ℝ f (Ici x) x} ∩ {_x | 0 ∈ s}
⊢ MeasurableSet ((fun x => derivWithin f (Ici x) x) ⁻¹' s)

tactic: exact
  (measurableSet_of_differentiableWithinAt_Ici_of_isComplete _ hs.isComplete).union
    ((measurableSet_of_differentiableWithinAt_Ici _).compl.inter (MeasurableSet.const _))
state_before: F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝² : CompleteSpace F
inst✝¹ : MeasurableSpace F
inst✝ : BorelSpace F
s : Set ((fun x => F) 1)
hs : IsClosed s
this :
  (fun x => derivWithin f (Ici x) x) ⁻¹' s =
    {x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ s} ∪
      {x | ¬DifferentiableWithinAt ℝ f (Ici x) x} ∩ {_x | 0 ∈ s}
⊢ MeasurableSet
    ({x | DifferentiableWithinAt ℝ f (Ici x) x ∧ derivWithin f (Ici x) x ∈ s} ∪
      {x | ¬DifferentiableWithinAt ℝ f (Ici x) x} ∩ {_x | 0 ∈ s})
Theorem: partialSups_eq_biSup
File: Mathlib/Order/PartialSups.lean

tactic: simpa only [iSup_subtype] using partialSups_eq_ciSup_Iic f n
state_before: α : Type u_1
inst✝ : CompleteLattice α
f : ℕ → α
n : ℕ
⊢ ↑(partialSups f) n = ⨆ (i : ℕ) (_ : i ≤ n), f i
Theorem: Function.minimalPeriod_eq_zero_of_nmem_periodicPts
File: Mathlib/Dynamics/PeriodicPts.lean

tactic: simp only [minimalPeriod, dif_neg hx]
state_before: α : Type u_1
β : Type ?u.21228
f fa : α → α
fb : β → β
x y : α
m n : ℕ
hx : ¬x ∈ periodicPts f
⊢ minimalPeriod f x = 0
Theorem: Basis.coe_dualBasis
File: Mathlib/LinearAlgebra/Dual.lean

tactic: ext (i x)
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
⊢ ↑(dualBasis b) = coord b

tactic: apply dualBasis_apply
state_before: case h.h
R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i : ι
x : M
⊢ ↑(↑(dualBasis b) i) x = ↑(coord b i) x
Theorem: ComplexShape.prev_eq'
File: Mathlib/Algebra/Homology/ComplexShape.lean

tactic: apply c.prev_eq _ h
state_before: ι : Type u_1
c : ComplexShape ι
i j : ι
h : Rel c i j
⊢ prev c j = i

tactic: rw [prev, dif_pos]
state_before: ι : Type u_1
c : ComplexShape ι
i j : ι
h : Rel c i j
⊢ Rel c (prev c j) j

tactic: exact Exists.choose_spec (⟨i, h⟩ : ∃ k, c.Rel k j)
state_before: ι : Type u_1
c : ComplexShape ι
i j : ι
h : Rel c i j
⊢ Rel c (Exists.choose ?hc) j

case hc
ι : Type u_1
c : ComplexShape ι
i j : ι
h : Rel c i j
⊢ ∃ i, Rel c i j
Theorem: Nat.dvd_add_iff_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.mul_sub_left_distrib, ← he, Nat.add_sub_cancel_left]
state_before: k m n : Nat
h : k ∣ m
d : Nat
x✝ : k ∣ k * d + n
e : Nat
he : k * d + n = k * e
⊢ n = k * (e - d)
Theorem: Basis.det_map
File: Mathlib/LinearAlgebra/Determinant.lean

tactic: rw [Basis.det_apply, Basis.toMatrix_map, Basis.det_apply]
state_before: R : Type u_2
inst✝⁸ : CommRing R
M : Type u_3
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M' : Type u_4
inst✝⁵ : AddCommGroup M'
inst✝⁴ : Module R M'
ι : Type u_1
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
e : Basis ι R M
A : Type ?u.2708089
inst✝¹ : CommRing A
inst✝ : Module A M
b : Basis ι R M
f : M ≃ₗ[R] M'
v : ι → M'
⊢ ↑(det (Basis.map b f)) v = ↑(det b) (↑(LinearEquiv.symm f) ∘ v)
Theorem: MeasureTheory.FiniteMeasure.tendsto_normalize_iff_tendsto
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: constructor
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
nonzero : μ ≠ 0
⊢ Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ)) ∧ Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ)) ↔
    Tendsto μs F (𝓝 μ)

tactic: rintro ⟨normalized_lim, mass_lim⟩
state_before: case mp
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
nonzero : μ ≠ 0
⊢ Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ)) ∧ Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ)) →
    Tendsto μs F (𝓝 μ)

tactic: exact tendsto_of_tendsto_normalize_testAgainstNN_of_tendsto_mass normalized_lim mass_lim
state_before: case mp.intro
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
nonzero : μ ≠ 0
normalized_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
⊢ Tendsto μs F (𝓝 μ)

tactic: intro μs_lim
state_before: case mpr
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
nonzero : μ ≠ 0
⊢ Tendsto μs F (𝓝 μ) →
    Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ)) ∧ Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))

tactic: refine' ⟨tendsto_normalize_of_tendsto μs_lim nonzero, μs_lim.mass⟩
state_before: case mpr
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
nonzero : μ ≠ 0
μs_lim : Tendsto μs F (𝓝 μ)
⊢ Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ)) ∧ Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
Theorem: Nat.divisors_one
File: Mathlib/NumberTheory/Divisors.lean

tactic: ext
state_before: n : ℕ
⊢ divisors 1 = {1}

tactic: simp
state_before: case a
n a✝ : ℕ
⊢ a✝ ∈ divisors 1 ↔ a✝ ∈ {1}
Theorem: isSimpleGroup_of_prime_card
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

tactic: have h' := Nat.Prime.one_lt (Fact.out (p := p.Prime))
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
⊢ Nontrivial α

tactic: rw [← h] at h'
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
h' : 1 < p
⊢ Nontrivial α

tactic: exact Fintype.one_lt_card_iff_nontrivial.1 h'
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
h' : 1 < Fintype.card α
⊢ Nontrivial α

tactic: have hcard := card_subgroup_dvd_card H
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
this : Nontrivial α
H : Subgroup α
x✝ : Normal H
⊢ H = ⊥ ∨ H = ⊤

tactic: rw [h, dvd_prime (Fact.out (p := p.Prime))] at hcard
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
this : Nontrivial α
H : Subgroup α
x✝ : Normal H
hcard : Fintype.card { x // x ∈ H } ∣ Fintype.card α
⊢ H = ⊥ ∨ H = ⊤

tactic: refine' hcard.imp (fun h1 => _) fun hp => _
state_before: α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
this : Nontrivial α
H : Subgroup α
x✝ : Normal H
hcard : Fintype.card { x // x ∈ H } = 1 ∨ Fintype.card { x // x ∈ H } = p
⊢ H = ⊥ ∨ H = ⊤

tactic: haveI := Fintype.card_le_one_iff_subsingleton.1 (le_of_eq h1)
state_before: case refine'_1
α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
this : Nontrivial α
H : Subgroup α
x✝ : Normal H
hcard : Fintype.card { x // x ∈ H } = 1 ∨ Fintype.card { x // x ∈ H } = p
h1 : Fintype.card { x // x ∈ H } = 1
⊢ H = ⊥

tactic: apply eq_bot_of_subsingleton
state_before: case refine'_1
α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp : Fact (Nat.Prime p)
h : Fintype.card α = p
this✝ : Nontrivial α
H : Subgroup α
x✝ : Normal H
hcard : Fintype.card { x // x ∈ H } = 1 ∨ Fintype.card { x // x ∈ H } = p
h1 : Fintype.card { x // x ∈ H } = 1
this : Subsingleton { x // x ∈ H }
⊢ H = ⊥

tactic: exact eq_top_of_card_eq _ (hp.trans h.symm)
state_before: case refine'_2
α✝ : Type u
a : α✝
inst✝² : Group α✝
α : Type u
inst✝¹ : Group α
inst✝ : Fintype α
p : ℕ
hp✝ : Fact (Nat.Prime p)
h : Fintype.card α = p
this : Nontrivial α
H : Subgroup α
x✝ : Normal H
hcard : Fintype.card { x // x ∈ H } = 1 ∨ Fintype.card { x // x ∈ H } = p
hp : Fintype.card { x // x ∈ H } = p
⊢ H = ⊤