tasksource/leandojo huggingface dataset:
Theorem: Finset.preimage_compl
File: Mathlib/Data/Finset/Preimage.lean

tactic: simp
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
inst✝³ : DecidableEq α
inst✝² : DecidableEq β
inst✝¹ : Fintype α
inst✝ : Fintype β
f : α → β
s : Finset β
hf : Injective f
⊢ ↑(preimage (sᶜ) f (_ : InjOn f (f ⁻¹' ↑(sᶜ)))) = ↑(preimage s f (_ : InjOn f (f ⁻¹' ↑s))ᶜ)
Theorem: mul_self_add_mul_self_eq_zero
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: rw [add_eq_zero_iff', mul_self_eq_zero, mul_self_eq_zero] <;> apply mul_self_nonneg
state_before: α : Type u
β : Type ?u.216729
inst✝ : LinearOrderedRing α
a b c x y : α
⊢ x * x + y * y = 0 ↔ x = 0 ∧ y = 0
Theorem: Sylow.normal_of_normalizer_normal
File: Mathlib/GroupTheory/Sylow.lean

tactic: rw [← normalizer_eq_top, ← normalizer_sup_eq_top' P le_normalizer, sup_idem]
state_before: G : Type u
α : Type v
β : Type w
inst✝² : Group G
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
hn : Normal (normalizer ↑P)
⊢ Normal ↑P
Theorem: List.nodup_middle
File: Mathlib/Data/List/Nodup.lean

tactic: simp only [nodup_append, not_or, and_left_comm, and_assoc, nodup_cons, mem_append,
  disjoint_cons_right]
state_before: α : Type u
β : Type v
l l₁✝ l₂✝ : List α
r : α → α → Prop
a✝ b a : α
l₁ l₂ : List α
⊢ Nodup (l₁ ++ a :: l₂) ↔ Nodup (a :: (l₁ ++ l₂))
Theorem: StateT.run_bind
File: src/lean/Init/Control/Lawful.lean

tactic: simp [bind, StateT.bind, run]
state_before: m : Type u_1 → Type u_2
σ α β : Type u_1
inst✝ : Monad m
x : StateT σ m α
f : α → StateT σ m β
s : σ
⊢ run (x >>= f) s = do
    let p ← run x s
    run (f p.fst) p.snd
Theorem: EuclideanGeometry.Cospherical.subset
File: Mathlib/Geometry/Euclidean/Sphere/Basic.lean

tactic: rcases hc with ⟨c, r, hcr⟩
state_before: V : Type ?u.7090
P : Type u_1
inst✝ : MetricSpace P
ps₁ ps₂ : Set P
hs : ps₁ ⊆ ps₂
hc : Cospherical ps₂
⊢ Cospherical ps₁

tactic: exact ⟨c, r, fun p hp => hcr p (hs hp)⟩
state_before: case intro.intro
V : Type ?u.7090
P : Type u_1
inst✝ : MetricSpace P
ps₁ ps₂ : Set P
hs : ps₁ ⊆ ps₂
c : P
r : ℝ
hcr : ∀ (p : P), p ∈ ps₂ → dist p c = r
⊢ Cospherical ps₁
Theorem: Complex.isometryOfOrthonormal_apply
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: rw [Complex.isometryOfOrthonormal, LinearIsometryEquiv.trans_apply]
state_before: ι : Type ?u.1373375
ι' : Type ?u.1373378
𝕜 : Type ?u.1373381
inst✝⁹ : IsROrC 𝕜
E : Type ?u.1373387
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1373407
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1373445
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : OrthonormalBasis (Fin 2) ℝ F
z : ℂ
⊢ ↑(isometryOfOrthonormal v) z = z.re • ↑v 0 + z.im • ↑v 1

tactic: simp [← v.sum_repr_symm]
state_before: ι : Type ?u.1373375
ι' : Type ?u.1373378
𝕜 : Type ?u.1373381
inst✝⁹ : IsROrC 𝕜
E : Type ?u.1373387
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1373407
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type u_1
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1373445
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : OrthonormalBasis (Fin 2) ℝ F
z : ℂ
⊢ ↑(LinearIsometryEquiv.symm v.repr) (↑orthonormalBasisOneI.repr z) = z.re • ↑v 0 + z.im • ↑v 1
Theorem: Nat.pow_dvd_pow_iff_le_right
File: Mathlib/Data/Nat/Pow.lean

tactic: rw [pow_dvd_pow_iff_pow_le_pow (lt_of_succ_lt w), pow_le_iff_le_right w]
state_before: x k l : ℕ
w : 1 < x
⊢ x ^ k ∣ x ^ l ↔ k ≤ l
Theorem: Irrational.inv
File: Mathlib/Data/Real/Irrational.lean

tactic: rwa [inv_inv]
state_before: q : ℚ
x y : ℝ
h : Irrational x
⊢ Irrational x⁻¹⁻¹
Theorem: sup_eq_sdiff_sup_sdiff_sup_inf
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sup_inf_left]
state_before: α : Type u
β : Type ?u.41421
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ x \ y ⊔ y \ x ⊔ x ⊓ y = (x \ y ⊔ y \ x ⊔ x) ⊓ (x \ y ⊔ y \ x ⊔ y)

tactic: ac_rfl
state_before: α : Type u
β : Type ?u.41421
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x \ y ⊔ y \ x ⊔ x) ⊓ (x \ y ⊔ y \ x ⊔ y) = (x \ y ⊔ x ⊔ y \ x) ⊓ (x \ y ⊔ (y \ x ⊔ y))

tactic: rw [sup_sdiff_right, sup_sdiff_right]
state_before: α : Type u
β : Type ?u.41421
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x \ y ⊔ x ⊔ y \ x) ⊓ (x \ y ⊔ (y \ x ⊔ y)) = (x ⊔ y \ x) ⊓ (x \ y ⊔ y)

tactic: rw [sup_sdiff_self_right, sup_sdiff_self_left, inf_idem]
state_before: α : Type u
β : Type ?u.41421
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ (x ⊔ y \ x) ⊓ (x \ y ⊔ y) = x ⊔ y
Theorem: IsCoprime.of_mul_add_left_left
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rw [add_comm] at h
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime (y * z + x) y
⊢ IsCoprime x y

tactic: exact h.of_add_mul_left_left
state_before: R : Type u
inst✝ : CommSemiring R
x y z : R
h : IsCoprime (x + y * z) y
⊢ IsCoprime x y
Theorem: Int.testBit_ldiff
File: Mathlib/Data/Int/Bitwise.lean

tactic: rw [← bitwise_diff, testBit_bitwise]
state_before: m n : ℤ
k : ℕ
⊢ testBit (ldiff' m n) k = (testBit m k && !testBit n k)
Theorem: Valuation.map_sub_le
File: Mathlib/RingTheory/Valuation/Basic.lean

tactic: rw [sub_eq_add_neg]
state_before: K : Type ?u.1744962
F : Type ?u.1744965
R : Type u_2
inst✝³ : DivisionRing K
Γ₀ : Type u_1
Γ'₀ : Type ?u.1744977
Γ''₀ : Type ?u.1744980
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : Ring R
inst✝ : LinearOrderedCommGroupWithZero Γ₀
v : Valuation R Γ₀
x✝ y✝ z x y : R
g : (fun x => Γ₀) x
hx : ↑v x ≤ g
hy : ↑v y ≤ g
⊢ ↑v (x - y) ≤ g

tactic: exact v.map_add_le hx (le_trans (le_of_eq (v.map_neg y)) hy)
state_before: K : Type ?u.1744962
F : Type ?u.1744965
R : Type u_2
inst✝³ : DivisionRing K
Γ₀ : Type u_1
Γ'₀ : Type ?u.1744977
Γ''₀ : Type ?u.1744980
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : Ring R
inst✝ : LinearOrderedCommGroupWithZero Γ₀
v : Valuation R Γ₀
x✝ y✝ z x y : R
g : (fun x => Γ₀) x
hx : ↑v x ≤ g
hy : ↑v y ≤ g
⊢ ↑v (x + -y) ≤ g
Theorem: Sum.liftRel_inl_inl
File: Mathlib/Data/Sum/Basic.lean

tactic: cases h
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
r r₁ r₂ : α → γ → Prop
s s₁ s₂ : β → δ → Prop
a : α
b : β
c : γ
d : δ
x : α ⊕ β
y : γ ⊕ δ
h : LiftRel r s (inl a) (inl c)
⊢ r a c

tactic: assumption
state_before: case inl
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type u_1
δ : Type u_2
r r₁ r₂ : α → γ → Prop
s s₁ s₂ : β → δ → Prop
a : α
b : β
c : γ
d : δ
x : α ⊕ β
y : γ ⊕ δ
a✝ : r a c
⊢ r a c
Theorem: Subalgebra.FG.prod
File: Mathlib/RingTheory/Adjoin/FG.lean

tactic: obtain ⟨s, hs⟩ := fg_def.1 hS
state_before: R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
T : Subalgebra R B
hS : FG S
hT : FG T
⊢ FG (Subalgebra.prod S T)

tactic: obtain ⟨t, ht⟩ := fg_def.1 hT
state_before: case intro
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
T : Subalgebra R B
hS : FG S
hT : FG T
s : Set A
hs : Set.Finite s ∧ Algebra.adjoin R s = S
⊢ FG (Subalgebra.prod S T)

tactic: rw [← hs.2, ← ht.2]
state_before: case intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
T : Subalgebra R B
hS : FG S
hT : FG T
s : Set A
hs : Set.Finite s ∧ Algebra.adjoin R s = S
t : Set B
ht : Set.Finite t ∧ Algebra.adjoin R t = T
⊢ FG (Subalgebra.prod S T)

tactic: exact fg_def.2 ⟨LinearMap.inl R A B '' (s ∪ {1}) ∪ LinearMap.inr R A B '' (t ∪ {1}),
  Set.Finite.union (Set.Finite.image _ (Set.Finite.union hs.1 (Set.finite_singleton _)))
    (Set.Finite.image _ (Set.Finite.union ht.1 (Set.finite_singleton _))),
  Algebra.adjoin_inl_union_inr_eq_prod R s t⟩
state_before: case intro.intro
R : Type u
A : Type v
B : Type w
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : Semiring B
inst✝ : Algebra R B
S : Subalgebra R A
T : Subalgebra R B
hS : FG S
hT : FG T
s : Set A
hs : Set.Finite s ∧ Algebra.adjoin R s = S
t : Set B
ht : Set.Finite t ∧ Algebra.adjoin R t = T
⊢ FG (Subalgebra.prod (Algebra.adjoin R s) (Algebra.adjoin R t))
Theorem: Real.rpow_inv_lt_iff_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: convert lt_rpow_inv_iff_of_neg (Real.rpow_pos_of_pos hx z⁻¹) (Real.rpow_pos_of_pos hy z) hz <;>
simp [← Real.rpow_mul hx.le, ← Real.rpow_mul hy.le, ne_of_lt hz]
state_before: x y z : ℝ
hx : 0 < x
hy : 0 < y
hz : z < 0
⊢ x ^ z⁻¹ < y ↔ y ^ z < x
Theorem: MeasureTheory.withDensity_smul'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: refine' Measure.ext fun s hs => _
state_before: α : Type u_1
β : Type ?u.1760781
γ : Type ?u.1760784
δ : Type ?u.1760787
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
⊢ withDensity μ (r • f) = r • withDensity μ f

tactic: rw [withDensity_apply _ hs, Measure.coe_smul, Pi.smul_apply, withDensity_apply _ hs,
  smul_eq_mul, ← lintegral_const_mul' r f hr]
state_before: α : Type u_1
β : Type ?u.1760781
γ : Type ?u.1760784
δ : Type ?u.1760787
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
s : Set α
hs : MeasurableSet s
⊢ ↑↑(withDensity μ (r • f)) s = ↑↑(r • withDensity μ f) s

tactic: rfl
state_before: α : Type u_1
β : Type ?u.1760781
γ : Type ?u.1760784
δ : Type ?u.1760787
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hr : r ≠ ⊤
s : Set α
hs : MeasurableSet s
⊢ (∫⁻ (a : α) in s, (r • f) a ∂μ) = ∫⁻ (a : α) in s, r * f a ∂μ
Theorem: Fin.castSucc_lt_succ
File: Mathlib/Data/Fin/Basic.lean

tactic: simp only [coe_castSucc, val_succ, Nat.lt_succ_self]
state_before: n m : ℕ
i : Fin n
⊢ ↑(↑castSucc i) < ↑(succ i)
Theorem: wcovby_iff_Ioo_eq
File: Mathlib/Order/Cover.lean

tactic: simp [eq_empty_iff_forall_not_mem]
state_before: α : Type u_1
β : Type ?u.10876
inst✝¹ : Preorder α
inst✝ : Preorder β
a b c : α
⊢ (∀ ⦃c : α⦄, a < c → ¬c < b) ↔ Ioo a b = ∅
Theorem: Primrec.dom_bool
File: Mathlib/Computability/Primrec.lean

tactic: cases b <;> rfl
state_before: α : Type u_1
β : Type ?u.131673
γ : Type ?u.131676
δ : Type ?u.131679
σ : Type ?u.131682
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
f : Bool → α
b : Bool
⊢ (bif id b then f true else f false) = f b
Theorem: Polynomial.forall_eq_iff_forall_eq
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simpa only [← subsingleton_iff] using subsingleton_iff_subsingleton
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ (∀ (f g : R[X]), f = g) ↔ ∀ (a b : R), a = b
Theorem: List.nodup_sublists
File: Mathlib/Data/List/Sublists.lean

tactic: simpa using h.to_ne
state_before: α : Type u
β : Type v
γ : Type w
l : List α
h✝ : Nodup l
l₁ l₂ : List α
h : Lex (fun x x_1 => x ≠ x_1) (reverse l₁) (reverse l₂)
⊢ l₁ ≠ l₂
Theorem: ContinuousLinearMap.isPositive_zero
File: Mathlib/Analysis/InnerProductSpace/Positive.lean

tactic: refine' ⟨isSelfAdjoint_zero _, fun x => _⟩
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.79559
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
⊢ IsPositive 0

tactic: change 0 ≤ re ⟪_, _⟫
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.79559
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
x : E
⊢ 0 ≤ reApplyInnerSelf 0 x

tactic: rw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.79559
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace 𝕜 F
inst✝¹ : CompleteSpace E
inst✝ : CompleteSpace F
x : E
⊢ 0 ≤ ↑re (inner (↑0 x) x)
Theorem: CategoryTheory.GrothendieckTopology.diagramNatTrans_id
File: Mathlib/CategoryTheory/Sites/Plus.lean

tactic: ext : 2
state_before: C : Type u
inst✝² : Category C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
⊢ diagramNatTrans J (𝟙 P) X = 𝟙 (diagram J P X)

tactic: refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
state_before: case w.h
C : Type u
inst✝² : Category C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
⊢ (diagramNatTrans J (𝟙 P) X).app x✝ = (𝟙 (diagram J P X)).app x✝

tactic: dsimp
state_before: case w.h
C : Type u
inst✝² : Category C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ (diagramNatTrans J (𝟙 P) X).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop P) i =
    (𝟙 (diagram J P X)).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop P) i

tactic: simp only [limit.lift_π, Multifork.ofι_pt, Multifork.ofι_π_app, Category.id_comp]
state_before: case w.h
C : Type u
inst✝² : Category C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ Multiequalizer.lift (Cover.index x✝.unop P) (multiequalizer (Cover.index x✝.unop P))
        (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 𝟙 (P.obj i.Y.op))
        (_ :
          ∀ (i : (Cover.index x✝.unop P).R),
            (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (𝟙 P).app i.Y.op)
                  (MulticospanIndex.fstTo (Cover.index x✝.unop P) i) ≫
                MulticospanIndex.fst (Cover.index x✝.unop P) i =
              (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (𝟙 P).app i.Y.op)
                  (MulticospanIndex.sndTo (Cover.index x✝.unop P) i) ≫
                MulticospanIndex.snd (Cover.index x✝.unop P) i) ≫
      Multiequalizer.ι (Cover.index x✝.unop P) i =
    𝟙 (multiequalizer (Cover.index x✝.unop P)) ≫ Multiequalizer.ι (Cover.index x✝.unop P) i

tactic: erw [Category.comp_id]
state_before: case w.h
C : Type u
inst✝² : Category C
J : GrothendieckTopology C
D : Type w
inst✝¹ : Category D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P✝ : Cᵒᵖ ⥤ D
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 𝟙 (P.obj i.Y.op) = Multiequalizer.ι (Cover.index x✝.unop P) i
Theorem: MatrixEquivTensor.invFun_smul
File: Mathlib/RingTheory/MatrixAlgebra.lean

tactic: simp [invFun, Finset.mul_sum]
state_before: R : Type u
inst✝⁴ : CommSemiring R
A : Type v
inst✝³ : Semiring A
inst✝² : Algebra R A
n : Type w
inst✝¹ : DecidableEq n
inst✝ : Fintype n
a : A
M : Matrix n n A
⊢ invFun R A n (a • M) = a ⊗ₜ[R] 1 * invFun R A n M
Theorem: PiToModule.fromMatrix_apply_single_one
File: Mathlib/LinearAlgebra/Matrix/Charpoly/LinearMap.lean

tactic: rw [PiToModule.fromMatrix_apply, Fintype.total_apply, Matrix.mulVec_single]
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
A : Matrix ι ι R
j : ι
⊢ ↑(↑(fromMatrix R b) A) (Pi.single j 1) = ∑ i : ι, A i j • b i

tactic: simp_rw [mul_one]
state_before: ι : Type u_1
inst✝⁴ : Fintype ι
M : Type u_3
inst✝³ : AddCommGroup M
R : Type u_2
inst✝² : CommRing R
inst✝¹ : Module R M
I : Ideal R
b : ι → M
hb : Submodule.span R (Set.range b) = ⊤
inst✝ : DecidableEq ι
A : Matrix ι ι R
j : ι
⊢ ∑ i : ι, (fun i => A i j * 1) i • b i = ∑ i : ι, A i j • b i
Theorem: MeasureTheory.setToFun_top_smul_measure
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

tactic: refine' setToFun_measure_zero' hT fun s _ hμs => _
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1671137
G : Type ?u.1671140
𝕜 : Type ?u.1671143
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive (⊤ • μ) T C
f : α → E
⊢ setToFun (⊤ • μ) T hT f = 0

tactic: rw [lt_top_iff_ne_top] at hμs
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1671137
G : Type ?u.1671140
𝕜 : Type ?u.1671143
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive (⊤ • μ) T C
f : α → E
s : Set α
x✝ : MeasurableSet s
hμs : ↑↑(⊤ • μ) s < ⊤
⊢ ↑↑(⊤ • μ) s = 0

tactic: simp only [true_and_iff, Measure.smul_apply, ENNReal.mul_eq_top, eq_self_iff_true,
  top_ne_zero, Ne.def, not_false_iff, not_or, Classical.not_not, smul_eq_mul] at hμs
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1671137
G : Type ?u.1671140
𝕜 : Type ?u.1671143
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive (⊤ • μ) T C
f : α → E
s : Set α
x✝ : MeasurableSet s
hμs : ↑↑(⊤ • μ) s ≠ ⊤
⊢ ↑↑(⊤ • μ) s = 0

tactic: simp only [hμs.right, Measure.smul_apply, MulZeroClass.mul_zero, smul_eq_mul]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type ?u.1671137
G : Type ?u.1671140
𝕜 : Type ?u.1671143
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f✝ g : α → E
hT : DominatedFinMeasAdditive (⊤ • μ) T C
f : α → E
s : Set α
x✝ : MeasurableSet s
hμs : ¬↑↑μ s = ⊤ ∧ ↑↑μ s = 0
⊢ ↑↑(⊤ • μ) s = 0
Theorem: Finset.card_Ioo_eq_card_Ico_sub_one
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: by_cases h : a < b
state_before: ι : Type ?u.112014
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
⊢ card (Ioo a b) = card (Ico a b) - 1

tactic: rw [Ico_eq_cons_Ioo h, card_cons]
state_before: case pos
ι : Type ?u.112014
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a < b
⊢ card (Ioo a b) = card (Ico a b) - 1

tactic: exact (Nat.add_sub_cancel _ _).symm
state_before: case pos
ι : Type ?u.112014
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a < b
⊢ card (Ioo a b) = card (Ioo a b) + 1 - 1

tactic: rw [Ioo_eq_empty h, Ico_eq_empty h, card_empty, zero_tsub]
state_before: case neg
ι : Type ?u.112014
α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : ¬a < b
⊢ card (Ioo a b) = card (Ico a b) - 1
Theorem: Cardinal.nfpFamily_lt_ord_lift_of_isRegular
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: apply nfpFamily_lt_ord_lift.{u, v} _ _ hf ha <;> rw [hc.cof_eq]
state_before: α : Type ?u.161838
r : α → α → Prop
ι : Type u
f : ι → Ordinal → Ordinal
c : Cardinal
hc : IsRegular c
hι : lift (#ι) < c
hc' : c ≠ ℵ₀
hf : ∀ (i : ι) (b : Ordinal), b < ord c → f i b < ord c
a : Ordinal
ha : a < ord c
⊢ nfpFamily f a < ord c

tactic: exact lt_of_le_of_ne hc.1 hc'.symm
state_before: α : Type ?u.161838
r : α → α → Prop
ι : Type u
f : ι → Ordinal → Ordinal
c : Cardinal
hc : IsRegular c
hι : lift (#ι) < c
hc' : c ≠ ℵ₀
hf : ∀ (i : ι) (b : Ordinal), b < ord c → f i b < ord c
a : Ordinal
ha : a < ord c
⊢ ℵ₀ < c

α : Type ?u.161838
r : α → α → Prop
ι : Type u
f : ι → Ordinal → Ordinal
c : Cardinal
hc : IsRegular c
hι : lift (#ι) < c
hc' : c ≠ ℵ₀
hf : ∀ (i : ι) (b : Ordinal), b < ord c → f i b < ord c
a : Ordinal
ha : a < ord c
⊢ lift (#ι) < c

tactic: exact hι
state_before: α : Type ?u.161838
r : α → α → Prop
ι : Type u
f : ι → Ordinal → Ordinal
c : Cardinal
hc : IsRegular c
hι : lift (#ι) < c
hc' : c ≠ ℵ₀
hf : ∀ (i : ι) (b : Ordinal), b < ord c → f i b < ord c
a : Ordinal
ha : a < ord c
⊢ lift (#ι) < c
Theorem: AddMonoidAlgebra.opRingEquiv_symm_single
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: simp
state_before: k : Type u₁
G : Type u₂
R : Type ?u.2396565
inst✝¹ : Semiring k
inst✝ : AddCommMonoid G
r : kᵐᵒᵖ
x : Gᵐᵒᵖ
⊢ ↑(RingEquiv.symm AddMonoidAlgebra.opRingEquiv) (single x r) = op (single x (unop r))
Theorem: List.Nat.mem_antidiagonal
File: Mathlib/Data/List/NatAntidiagonal.lean

tactic: rw [antidiagonal, mem_map]
state_before: n : ℕ
x : ℕ × ℕ
⊢ x ∈ antidiagonal n ↔ x.fst + x.snd = n

tactic: constructor
state_before: n : ℕ
x : ℕ × ℕ
⊢ (∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x) ↔ x.fst + x.snd = n

tactic: rintro ⟨i, hi, rfl⟩
state_before: case mp
n : ℕ
x : ℕ × ℕ
⊢ (∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x) → x.fst + x.snd = n

tactic: rw [mem_range, lt_succ_iff] at hi
state_before: case mp.intro.intro
n i : ℕ
hi : i ∈ range (n + 1)
⊢ (i, n - i).fst + (i, n - i).snd = n

tactic: exact add_tsub_cancel_of_le hi
state_before: case mp.intro.intro
n i : ℕ
hi : i ≤ n
⊢ (i, n - i).fst + (i, n - i).snd = n

tactic: rintro rfl
state_before: case mpr
n : ℕ
x : ℕ × ℕ
⊢ x.fst + x.snd = n → ∃ a, a ∈ range (n + 1) ∧ (a, n - a) = x

tactic: refine' ⟨x.fst, _, _⟩
state_before: case mpr
x : ℕ × ℕ
⊢ ∃ a, a ∈ range (x.fst + x.snd + 1) ∧ (a, x.fst + x.snd - a) = x

tactic: rw [mem_range, add_assoc, lt_add_iff_pos_right]
state_before: case mpr.refine'_1
x : ℕ × ℕ
⊢ x.fst ∈ range (x.fst + x.snd + 1)

tactic: exact zero_lt_succ _
state_before: case mpr.refine'_1
x : ℕ × ℕ
⊢ 0 < x.snd + 1

tactic: exact Prod.ext rfl (by simp only [add_tsub_cancel_left])
state_before: case mpr.refine'_2
x : ℕ × ℕ
⊢ (x.fst, x.fst + x.snd - x.fst) = x

tactic: simp only [add_tsub_cancel_left]
state_before: x : ℕ × ℕ
⊢ (x.fst, x.fst + x.snd - x.fst).snd = x.snd
Theorem: Finset.multiplicativeEnergy_comm
File: Mathlib/Combinatorics/Additive/Energy.lean

tactic: rw [multiplicativeEnergy, ← Finset.card_map (Equiv.prodComm _ _).toEmbedding, map_filter]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CommMonoid α
s t : Finset α
⊢ multiplicativeEnergy s t = multiplicativeEnergy t s

tactic: simp [-Finset.card_map, eq_comm, multiplicativeEnergy, mul_comm, map_eq_image, Function.comp]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : CommMonoid α
s t : Finset α
⊢ card
      (filter ((fun x => x.fst.fst * x.snd.fst = x.fst.snd * x.snd.snd) ∘ ↑(Equiv.prodComm (α × α) (α × α)).symm)
        (map (Equiv.toEmbedding (Equiv.prodComm (α × α) (α × α))) ((s ×ˢ s) ×ˢ t ×ˢ t))) =
    multiplicativeEnergy t s
Theorem: MeasureTheory.Measure.integral_comp_smul_of_nonneg
File: Mathlib/MeasureTheory/Measure/Haar/NormedSpace.lean

tactic: rw [integral_comp_smul μ f R, abs_of_nonneg (inv_nonneg.2 (pow_nonneg hR _))]
state_before: E : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : MeasurableSpace E
inst✝⁵ : BorelSpace E
inst✝⁴ : FiniteDimensional ℝ E
μ : Measure E
inst✝³ : IsAddHaarMeasure μ
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
s : Set E
f : E → F
R : ℝ
hR : 0 ≤ R
⊢ (∫ (x : E), f (R • x) ∂μ) = (R ^ finrank ℝ E)⁻¹ • ∫ (x : E), f x ∂μ