tasksource/leandojo huggingface dataset:
Theorem: Equiv.Perm.signBijAux_mem
File: Mathlib/GroupTheory/Perm/Sign.lean

tactic: unfold signBijAux
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
f : Perm (Fin n)
x✝ : (_ : Fin n) × Fin n
a₁ a₂ : Fin n
ha : { fst := a₁, snd := a₂ } ∈ finPairsLT n
⊢ signBijAux f { fst := a₁, snd := a₂ } ∈ finPairsLT n

tactic: split_ifs with h
state_before: α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
f : Perm (Fin n)
x✝ : (_ : Fin n) × Fin n
a₁ a₂ : Fin n
ha : { fst := a₁, snd := a₂ } ∈ finPairsLT n
⊢ (if x : ↑f { fst := a₁, snd := a₂ }.snd < ↑f { fst := a₁, snd := a₂ }.fst then
      { fst := ↑f { fst := a₁, snd := a₂ }.fst, snd := ↑f { fst := a₁, snd := a₂ }.snd }
    else { fst := ↑f { fst := a₁, snd := a₂ }.snd, snd := ↑f { fst := a₁, snd := a₂ }.fst }) ∈
    finPairsLT n

tactic: exact mem_finPairsLT.2 h
state_before: case inl
α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
f : Perm (Fin n)
x✝ : (_ : Fin n) × Fin n
a₁ a₂ : Fin n
ha : { fst := a₁, snd := a₂ } ∈ finPairsLT n
h : ↑f { fst := a₁, snd := a₂ }.snd < ↑f { fst := a₁, snd := a₂ }.fst
⊢ { fst := ↑f { fst := a₁, snd := a₂ }.fst, snd := ↑f { fst := a₁, snd := a₂ }.snd } ∈ finPairsLT n

tactic: exact mem_finPairsLT.2
  ((le_of_not_gt h).lt_of_ne fun h => (mem_finPairsLT.1 ha).ne (f.injective h.symm))
state_before: case inr
α : Type u
β : Type v
inst✝ : DecidableEq α
n : ℕ
f : Perm (Fin n)
x✝ : (_ : Fin n) × Fin n
a₁ a₂ : Fin n
ha : { fst := a₁, snd := a₂ } ∈ finPairsLT n
h : ¬↑f { fst := a₁, snd := a₂ }.snd < ↑f { fst := a₁, snd := a₂ }.fst
⊢ { fst := ↑f { fst := a₁, snd := a₂ }.snd, snd := ↑f { fst := a₁, snd := a₂ }.fst } ∈ finPairsLT n
Theorem: commProb_def'
File: Mathlib/GroupTheory/CommutingProbability.lean

tactic: rw [commProb, card_comm_eq_card_conjClasses_mul_card, Nat.cast_mul, sq]
state_before: M : Type ?u.17813
inst✝³ : Mul M
inst✝² : Finite M
G : Type u_1
inst✝¹ : Group G
inst✝ : Finite G
⊢ commProb G = ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)

tactic: exact mul_div_mul_right _ _ (Nat.cast_ne_zero.mpr Finite.card_pos.ne')
state_before: M : Type ?u.17813
inst✝³ : Mul M
inst✝² : Finite M
G : Type u_1
inst✝¹ : Group G
inst✝ : Finite G
⊢ ↑(Nat.card (ConjClasses G)) * ↑(Nat.card G) / (↑(Nat.card G) * ↑(Nat.card G)) =
    ↑(Nat.card (ConjClasses G)) / ↑(Nat.card G)
Theorem: IsROrC.bit1_im
File: Mathlib/Data/IsROrC/Basic.lean

tactic: simp only [bit1, map_add, bit0_im, one_im, add_zero]
state_before: K : Type u_1
E : Type ?u.1882781
inst✝ : IsROrC K
z : K
⊢ ↑im (bit1 z) = bit0 (↑im z)
Theorem: CategoryTheory.hasProduct_fin
File: Mathlib/CategoryTheory/Limits/Constructions/FiniteProductsOfBinaryProducts.lean

tactic: letI : HasLimitsOfShape (Discrete (Fin 0)) C :=
  hasLimitsOfShape_of_equivalence (Discrete.equivalence.{0} finZeroEquiv'.symm)
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
f : Fin 0 → C
⊢ HasProduct f

tactic: infer_instance
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
f : Fin 0 → C
this : HasLimitsOfShape (Discrete (Fin 0)) C :=
  hasLimitsOfShape_of_equivalence (Discrete.equivalence finZeroEquiv'.symm)
⊢ HasProduct f

tactic: haveI := hasProduct_fin n
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
n : ℕ
f : Fin (n + 1) → C
⊢ HasProduct f

tactic: apply HasLimit.mk ⟨_, extendFanIsLimit f (limit.isLimit _) (limit.isLimit _)⟩
state_before: J : Type v
inst✝⁴ : SmallCategory J
C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasBinaryProducts C
inst✝ : HasTerminal C
n : ℕ
f : Fin (n + 1) → C
this : ∀ (f : Fin n → C), HasProduct f
⊢ HasProduct f
Theorem: hasDerivWithinAt_Iio_iff_Iic
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: rw [← Iic_diff_right, hasDerivWithinAt_diff_singleton]
state_before: 𝕜 : Type u
inst✝⁵ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
E : Type w
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
inst✝ : PartialOrder 𝕜
⊢ HasDerivWithinAt f f' (Iio x) x ↔ HasDerivWithinAt f f' (Iic x) x
Theorem: Mon_.one_rightUnitor
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

tactic: slice_lhs 2 3 => rw [rightUnitor_naturality, ← unitors_equal]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : MonoidalCategory C
M : Mon_ C
⊢ ((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ 𝟙 (𝟙_ C))) ≫ (ρ_ M.X).hom = M.one

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : MonoidalCategory C
M : Mon_ C
⊢ (λ_ (𝟙_ C)).inv ≫ (λ_ (𝟙_ C)).hom ≫ M.one = M.one
Theorem: Fintype.card_subtype_or
File: Mathlib/Data/Fintype/Sum.lean

tactic: classical
  convert Fintype.card_le_of_embedding (subtypeOrLeftEmbedding p q)
  rw [Fintype.card_sum]
state_before: α : Type u_1
β : Type ?u.13939
p q : α → Prop
inst✝² : Fintype { x // p x }
inst✝¹ : Fintype { x // q x }
inst✝ : Fintype { x // p x ∨ q x }
⊢ card { x // p x ∨ q x } ≤ card { x // p x } + card { x // q x }

tactic: convert Fintype.card_le_of_embedding (subtypeOrLeftEmbedding p q)
state_before: α : Type u_1
β : Type ?u.13939
p q : α → Prop
inst✝² : Fintype { x // p x }
inst✝¹ : Fintype { x // q x }
inst✝ : Fintype { x // p x ∨ q x }
⊢ card { x // p x ∨ q x } ≤ card { x // p x } + card { x // q x }

tactic: rw [Fintype.card_sum]
state_before: case h.e'_4
α : Type u_1
β : Type ?u.13939
p q : α → Prop
inst✝² : Fintype { x // p x }
inst✝¹ : Fintype { x // q x }
inst✝ : Fintype { x // p x ∨ q x }
⊢ card { x // p x } + card { x // q x } = card ({ x // p x } ⊕ { x // q x })
Theorem: CategoryTheory.epi_iff_surjective
File: Mathlib/CategoryTheory/Types.lean

tactic: constructor
state_before: X Y : Type u
f : X ⟶ Y
⊢ Epi f ↔ Function.Surjective f

tactic: rintro ⟨H⟩
state_before: case mp
X Y : Type u
f : X ⟶ Y
⊢ Epi f → Function.Surjective f

tactic: refine' Function.surjective_of_right_cancellable_Prop fun g₁ g₂ hg => _
state_before: case mp.mk
X Y : Type u
f : X ⟶ Y
H : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
⊢ Function.Surjective f

tactic: rw [← Equiv.ulift.symm.injective.comp_left.eq_iff]
state_before: case mp.mk
X Y : Type u
f : X ⟶ Y
H : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
g₁ g₂ : Y → Prop
hg : g₁ ∘ f = g₂ ∘ f
⊢ g₁ = g₂

tactic: apply H
state_before: case mp.mk
X Y : Type u
f : X ⟶ Y
H : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
g₁ g₂ : Y → Prop
hg : g₁ ∘ f = g₂ ∘ f
⊢ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₁ = (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₂

tactic: change ULift.up ∘ g₁ ∘ f = ULift.up ∘ g₂ ∘ f
state_before: case mp.mk.a
X Y : Type u
f : X ⟶ Y
H : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
g₁ g₂ : Y → Prop
hg : g₁ ∘ f = g₂ ∘ f
⊢ f ≫ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₁ = f ≫ (fun x x_1 => x ∘ x_1) (↑Equiv.ulift.symm) g₂

tactic: rw [hg]
state_before: case mp.mk.a
X Y : Type u
f : X ⟶ Y
H : ∀ {Z : Type u} (g h : Y ⟶ Z), f ≫ g = f ≫ h → g = h
g₁ g₂ : Y → Prop
hg : g₁ ∘ f = g₂ ∘ f
⊢ ULift.up ∘ g₁ ∘ f = ULift.up ∘ g₂ ∘ f

tactic: exact fun H => ⟨fun g g' h => H.injective_comp_right h⟩
state_before: case mpr
X Y : Type u
f : X ⟶ Y
⊢ Function.Surjective f → Epi f
Theorem: Associates.map_subtype_coe_factors'
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp [factors', Multiset.map_pmap, Multiset.pmap_eq_map]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a : α
⊢ map Subtype.val (factors' a) = map Associates.mk (factors a)
Theorem: Monotone.map_iSup_of_continuousAt'
File: Mathlib/Topology/Order/Basic.lean

tactic: rw [iSup, Mf.map_sSup_of_continuousAt' Cf (range_nonempty g), ← range_comp, iSup]
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : CompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : CompleteLinearOrder β
inst✝³ : TopologicalSpace β
inst✝² : OrderClosedTopology β
inst✝¹ : Nonempty γ
ι : Sort u_1
inst✝ : Nonempty ι
f : α → β
g : ι → α
Cf : ContinuousAt f (iSup g)
Mf : Monotone f
⊢ f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : CompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : CompleteLinearOrder β
inst✝³ : TopologicalSpace β
inst✝² : OrderClosedTopology β
inst✝¹ : Nonempty γ
ι : Sort u_1
inst✝ : Nonempty ι
f : α → β
g : ι → α
Cf : ContinuousAt f (iSup g)
Mf : Monotone f
⊢ sSup (range (f ∘ g)) = sSup (range fun i => f (g i))
Theorem: Finset.preimage_mul_left_one
File: Mathlib/Data/Finset/Pointwise.lean

tactic: classical rw [← image_mul_left', image_one, mul_one]
state_before: F : Type ?u.676324
α : Type u_1
β : Type ?u.676330
γ : Type ?u.676333
inst✝ : Group α
s t : Finset α
a b : α
⊢ preimage 1 ((fun x x_1 => x * x_1) a) (_ : Set.InjOn ((fun x x_1 => x * x_1) a) ((fun x x_1 => x * x_1) a ⁻¹' ↑1)) =
    {a⁻¹}

tactic: rw [← image_mul_left', image_one, mul_one]
state_before: F : Type ?u.676324
α : Type u_1
β : Type ?u.676330
γ : Type ?u.676333
inst✝ : Group α
s t : Finset α
a b : α
⊢ preimage 1 ((fun x x_1 => x * x_1) a) (_ : Set.InjOn ((fun x x_1 => x * x_1) a) ((fun x x_1 => x * x_1) a ⁻¹' ↑1)) =
    {a⁻¹}
Theorem: CategoryTheory.Over.CreatesConnected.raised_cone_lowers_to_original
File: Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean

tactic: aesop_cat
state_before: J : Type v
inst✝² : SmallCategory J
C : Type u
inst✝¹ : Category C
X : C
inst✝ : IsConnected J
B : C
F : J ⥤ Over B
c : Cone (F ⋙ forget B)
⊢ (forget B).mapCone (raiseCone c) = c
Theorem: mulLECancellable_one
File: Mathlib/Algebra/Order/Monoid/Lemmas.lean

tactic: simpa only [one_mul] using id
state_before: α : Type u_1
β : Type ?u.83868
inst✝¹ : Monoid α
inst✝ : LE α
a b : α
⊢ 1 * a ≤ 1 * b → a ≤ b
Theorem: QuadraticForm.associated_isSymm
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [associated_apply, add_comm, add_left_comm, sub_eq_add_neg, add_assoc]
state_before: S : Type u_3
R : Type u_1
R₁ : Type ?u.403144
M : Type u_2
inst✝⁷ : Ring R
inst✝⁶ : CommRing R₁
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module R₁ M
inst✝² : CommSemiring S
inst✝¹ : Algebra S R
inst✝ : Invertible 2
B₁ : BilinForm R M
Q : QuadraticForm R M
x y : M
⊢ bilin (↑(associatedHom S) Q) x y = bilin (↑(associatedHom S) Q) y x
Theorem: QuotientGroup.leftRel_apply
File: Mathlib/GroupTheory/Coset.lean

tactic: simp only [inv_mul_eq_iff_eq_mul, Subgroup.coe_inv, eq_mul_inv_iff_mul_eq]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∃ a, y * ↑a = x) ↔ ∃ a, x⁻¹ * y = ↑a⁻¹

tactic: simp [exists_inv_mem_iff_exists_mem]
state_before: α : Type u_1
inst✝ : Group α
s : Subgroup α
x y : α
⊢ (∃ a, x⁻¹ * y = ↑a⁻¹) ↔ x⁻¹ * y ∈ s
Theorem: Real.hasStrictDerivAt_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean

tactic: exact_mod_cast (Complex.hasStrictDerivAt_tan (by exact_mod_cast h)).real_of_complex
state_before: x : ℝ
h : cos x ≠ 0
⊢ HasStrictDerivAt tan (↑1 / cos x ^ 2) x

tactic: exact_mod_cast h
state_before: x : ℝ
h : cos x ≠ 0
⊢ Complex.cos ↑x ≠ 0
Theorem: EReal.top_mul_of_neg
File: Mathlib/Data/Real/EReal.lean

tactic: rw [EReal.mul_comm]
state_before: x : EReal
h : x < 0
⊢ ⊤ * x = ⊥

tactic: exact mul_top_of_neg h
state_before: x : EReal
h : x < 0
⊢ x * ⊤ = ⊥
Theorem: StrictConvex.add_left
File: Mathlib/Analysis/Convex/Strict.lean

tactic: simpa only [singleton_add] using (strictConvex_singleton z).add hs
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.85155
E : Type u_2
F : Type ?u.85161
β : Type ?u.85164
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : TopologicalSpace E
inst✝⁵ : TopologicalSpace F
inst✝⁴ : AddCommGroup E
inst✝³ : AddCommGroup F
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 F
inst✝ : ContinuousAdd E
s t : Set E
hs : StrictConvex 𝕜 s
z : E
⊢ StrictConvex 𝕜 ((fun x => z + x) '' s)
Theorem: NormedAddGroupHom.NormNoninc.neg_iff
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: simpa using h x
state_before: V : Type ?u.497709
W : Type ?u.497712
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.497721
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ : NormedAddGroupHom V W
f : NormedAddGroupHom V₁ V₂
h : NormNoninc (-f)
x : V₁
⊢ ‖↑f x‖ ≤ ‖x‖
Theorem: List.reduceOption_length_lt_iff
File: Mathlib/Data/List/Basic.lean

tactic: rw [(reduceOption_length_le l).lt_iff_ne, Ne, reduceOption_length_eq_iff]
state_before: ι : Type ?u.354270
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
l : List (Option α)
⊢ length (reduceOption l) < length l ↔ none ∈ l

tactic: induction l <;> simp [*]
state_before: ι : Type ?u.354270
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
l : List (Option α)
⊢ (¬∀ (x : Option α), x ∈ l → Option.isSome x = true) ↔ none ∈ l

tactic: rw [@eq_comm _ none, ← Option.not_isSome_iff_eq_none, Decidable.imp_iff_not_or]
state_before: case cons
ι : Type ?u.354270
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
head✝ : Option α
tail✝ : List (Option α)
tail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → Option.isSome x = true) ↔ none ∈ tail✝
⊢ (Option.isSome head✝ = true → ∃ x, x ∈ tail✝ ∧ Option.isNone x = true) ↔ none = head✝ ∨ none ∈ tail✝

tactic: simp [Option.isNone_iff_eq_none]
state_before: case cons
ι : Type ?u.354270
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
head✝ : Option α
tail✝ : List (Option α)
tail_ih✝ : (¬∀ (x : Option α), x ∈ tail✝ → Option.isSome x = true) ↔ none ∈ tail✝
⊢ (¬Option.isSome head✝ = true ∨ ∃ x, x ∈ tail✝ ∧ Option.isNone x = true) ↔ ¬Option.isSome head✝ = true ∨ none ∈ tail✝
Theorem: CategoryTheory.Subobject.factors_of_le
File: Mathlib/CategoryTheory/Subobject/FactorThru.lean

tactic: simp only [factors_iff]
state_before: C : Type u₁
inst✝¹ : Category C
X Y✝ Z✝ : C
D : Type u₂
inst✝ : Category D
Y Z : C
P Q : Subobject Y
f : Z ⟶ Y
h : P ≤ Q
⊢ Factors P f → Factors Q f

tactic: exact fun ⟨u, hu⟩ => ⟨u ≫ ofLE _ _ h, by simp [← hu]⟩
state_before: C : Type u₁
inst✝¹ : Category C
X Y✝ Z✝ : C
D : Type u₂
inst✝ : Category D
Y Z : C
P Q : Subobject Y
f : Z ⟶ Y
h : P ≤ Q
⊢ MonoOver.Factors (representative.obj P) f → MonoOver.Factors (representative.obj Q) f

tactic: simp [← hu]
state_before: C : Type u₁
inst✝¹ : Category C
X Y✝ Z✝ : C
D : Type u₂
inst✝ : Category D
Y Z : C
P Q : Subobject Y
f : Z ⟶ Y
h : P ≤ Q
x✝ : MonoOver.Factors (representative.obj P) f
u : Z ⟶ (representative.obj P).obj.left
hu : u ≫ MonoOver.arrow (representative.obj P) = f
⊢ (u ≫ ofLE P Q h) ≫ MonoOver.arrow (representative.obj Q) = f
Theorem: Module.finrank_le_one_iff_top_isPrincipal
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [← Module.rank_le_one_iff_top_isPrincipal, ← finrank_eq_rank, ← Cardinal.natCast_le,
  Nat.cast_one]
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : FiniteDimensional K V
⊢ finrank K V ≤ 1 ↔ IsPrincipal ⊤
Theorem: MeasureTheory.withDensity_tsum
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: ext1 s hs
state_before: α : Type u_1
β : Type ?u.1767013
γ : Type ?u.1767016
δ : Type ?u.1767019
m : MeasurableSpace α
μ ν : Measure α
f : ℕ → α → ℝ≥0∞
h : ∀ (i : ℕ), Measurable (f i)
⊢ withDensity μ (∑' (n : ℕ), f n) = sum fun n => withDensity μ (f n)

tactic: simp_rw [sum_apply _ hs, withDensity_apply _ hs]
state_before: case h
α : Type u_1
β : Type ?u.1767013
γ : Type ?u.1767016
δ : Type ?u.1767019
m : MeasurableSpace α
μ ν : Measure α
f : ℕ → α → ℝ≥0∞
h : ∀ (i : ℕ), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ↑↑(withDensity μ (∑' (n : ℕ), f n)) s = ↑↑(sum fun n => withDensity μ (f n)) s

tactic: change (∫⁻ x in s, (∑' n, f n) x ∂μ) = ∑' i : ℕ, ∫⁻ x, f i x ∂μ.restrict s
state_before: case h
α : Type u_1
β : Type ?u.1767013
γ : Type ?u.1767016
δ : Type ?u.1767019
m : MeasurableSpace α
μ ν : Measure α
f : ℕ → α → ℝ≥0∞
h : ∀ (i : ℕ), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ (∫⁻ (a : α) in s, tsum (fun n => f n) a ∂μ) = ∑' (i : ℕ), ∫⁻ (a : α) in s, f i a ∂μ

tactic: rw [← lintegral_tsum fun i => (h i).aemeasurable]
state_before: case h
α : Type u_1
β : Type ?u.1767013
γ : Type ?u.1767016
δ : Type ?u.1767019
m : MeasurableSpace α
μ ν : Measure α
f : ℕ → α → ℝ≥0∞
h : ∀ (i : ℕ), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ (∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ) = ∑' (i : ℕ), ∫⁻ (x : α) in s, f i x ∂μ

tactic: refine' lintegral_congr fun x => tsum_apply (Pi.summable.2 fun _ => ENNReal.summable)
state_before: case h
α : Type u_1
β : Type ?u.1767013
γ : Type ?u.1767016
δ : Type ?u.1767019
m : MeasurableSpace α
μ ν : Measure α
f : ℕ → α → ℝ≥0∞
h : ∀ (i : ℕ), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ (∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ) = ∫⁻ (a : α) in s, ∑' (i : ℕ), f i a ∂μ
Theorem: Cardinal.toNat_congr
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← toNat_lift, (lift_mk_eq.{_,_,v}).mpr ⟨e⟩, toNat_lift]
state_before: α β✝ : Type u
β : Type v
e : α ≃ β
⊢ ↑toNat (#α) = ↑toNat (#β)
Theorem: Real.abs_rpow_le_exp_log_mul
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: refine' (abs_rpow_le_abs_rpow x y).trans _
state_before: x y : ℝ
⊢ abs (x ^ y) ≤ exp (log x * y)

tactic: by_cases hx : x = 0
state_before: x y : ℝ
⊢ abs x ^ y ≤ exp (log x * y)

tactic: by_cases hy : y = 0 <;> simp [hx, hy, zero_le_one]
state_before: case pos
x y : ℝ
hx : x = 0
⊢ abs x ^ y ≤ exp (log x * y)

tactic: rw [rpow_def_of_pos (abs_pos.2 hx), log_abs]
state_before: case neg
x y : ℝ
hx : ¬x = 0
⊢ abs x ^ y ≤ exp (log x * y)
Theorem: Subgroup.index_mul_card
File: Mathlib/GroupTheory/Index.lean

tactic: rw [← relindex_bot_left_eq_card, ← index_bot_eq_card, mul_comm]
state_before: G : Type u_1
inst✝¹ : Group G
H K L : Subgroup G
inst✝ : Fintype G
hH : Fintype { x // x ∈ H }
⊢ index H * Fintype.card { x // x ∈ H } = Fintype.card G

tactic: exact relindex_mul_index bot_le
state_before: G : Type u_1
inst✝¹ : Group G
H K L : Subgroup G
inst✝ : Fintype G
hH : Fintype { x // x ∈ H }
⊢ relindex ⊥ H * index H = index ⊥
Theorem: NormedAddGroupHom.SurjectiveOnWith.exists_pos
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: refine' ⟨|C| + 1, _, _⟩
state_before: V : Type ?u.219726
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.219735
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ g f : NormedAddGroupHom V₁ V₂
K : AddSubgroup V₂
C : ℝ
h : SurjectiveOnWith f K C
⊢ ∃ C', C' > 0 ∧ SurjectiveOnWith f K C'

tactic: linarith [abs_nonneg C]
state_before: case refine'_1
V : Type ?u.219726
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.219735
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ g f : NormedAddGroupHom V₁ V₂
K : AddSubgroup V₂
C : ℝ
h : SurjectiveOnWith f K C
⊢ abs C + 1 > 0

tactic: apply h.mono
state_before: case refine'_2
V : Type ?u.219726
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.219735
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ g f : NormedAddGroupHom V₁ V₂
K : AddSubgroup V₂
C : ℝ
h : SurjectiveOnWith f K C
⊢ SurjectiveOnWith f K (abs C + 1)

tactic: linarith [le_abs_self C]
state_before: case refine'_2
V : Type ?u.219726
V₁ : Type u_1
V₂ : Type u_2
V₃ : Type ?u.219735
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f✝ g f : NormedAddGroupHom V₁ V₂
K : AddSubgroup V₂
C : ℝ
h : SurjectiveOnWith f K C
⊢ C ≤ abs C + 1
Theorem: Behrend.mem_box
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: simp only [box, Fintype.mem_piFinset, mem_range]
state_before: α : Type ?u.474
β : Type ?u.477
n d k N : ℕ
x : Fin n → ℕ
⊢ x ∈ box n d ↔ ∀ (i : Fin n), x i < d
Theorem: LinearOrderedField.smul_Ico
File: Mathlib/Algebra/Order/Pointwise.lean

tactic: ext x
state_before: α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
⊢ r • Ico a b = Ico (r • a) (r • b)

tactic: simp only [mem_smul_set, smul_eq_mul, mem_Ico]
state_before: case h
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Ico a b ↔ x ∈ Ico (r • a) (r • b)

tactic: constructor
state_before: case h
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y, (a ≤ y ∧ y < b) ∧ r * y = x) ↔ r * a ≤ x ∧ x < r * b

tactic: rintro ⟨a, ⟨a_h_left_left, a_h_left_right⟩, rfl⟩
state_before: case h.mp
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y, (a ≤ y ∧ y < b) ∧ r * y = x) → r * a ≤ x ∧ x < r * b

tactic: constructor
state_before: case h.mp.intro.intro.intro
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ ≤ a
a_h_left_right : a < b
⊢ r * a✝ ≤ r * a ∧ r * a < r * b

tactic: exact (mul_le_mul_left hr).mpr a_h_left_left
state_before: case h.mp.intro.intro.intro.left
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ ≤ a
a_h_left_right : a < b
⊢ r * a✝ ≤ r * a

case h.mp.intro.intro.intro.right
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ ≤ a
a_h_left_right : a < b
⊢ r * a < r * b

tactic: exact (mul_lt_mul_left hr).mpr a_h_left_right
state_before: case h.mp.intro.intro.intro.right
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a✝ b r : K
hr : 0 < r
a : K
a_h_left_left : a✝ ≤ a
a_h_left_right : a < b
⊢ r * a < r * b

tactic: rintro ⟨a_left, a_right⟩
state_before: case h.mpr
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ r * a ≤ x ∧ x < r * b → ∃ y, (a ≤ y ∧ y < b) ∧ r * y = x

tactic: use x / r
state_before: case h.mpr.intro
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a ≤ x
a_right : x < r * b
⊢ ∃ y, (a ≤ y ∧ y < b) ∧ r * y = x

tactic: refine' ⟨⟨(le_div_iff' hr).mpr a_left, (div_lt_iff' hr).mpr a_right⟩, _⟩
state_before: case h.mpr.intro
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a ≤ x
a_right : x < r * b
⊢ (a ≤ x / r ∧ x / r < b) ∧ r * (x / r) = x

tactic: rw [mul_div_cancel' _ (ne_of_gt hr)]
state_before: case h.mpr.intro
α : Type ?u.56727
K : Type u_1
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
a_left : r * a ≤ x
a_right : x < r * b
⊢ r * (x / r) = x
Theorem: Pell.pellZd_succ
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [Zsqrtd.ext]
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ pellZd a1 (n + 1) = pellZd a1 n * { re := ↑a, im := 1 }
Theorem: LucasLehmer.Int.coe_nat_two_pow_pred
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: decide
state_before: p : ℕ
⊢ 0 < 2