tasksource/leandojo huggingface dataset:
Theorem: Cardinal.isStrongLimit_beth
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

tactic: rcases eq_or_ne o 0 with (rfl | h)
state_before: α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
⊢ IsStrongLimit (beth o)

tactic: rw [beth_zero]
state_before: case inl
α : Type ?u.114391
r : α → α → Prop
H : IsSuccLimit 0
⊢ IsStrongLimit (beth 0)

tactic: exact isStrongLimit_aleph0
state_before: case inl
α : Type ?u.114391
r : α → α → Prop
H : IsSuccLimit 0
⊢ IsStrongLimit ℵ₀

tactic: refine' ⟨beth_ne_zero o, fun a ha => _⟩
state_before: case inr
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
⊢ IsStrongLimit (beth o)

tactic: rw [beth_limit ⟨h, isSuccLimit_iff_succ_lt.1 H⟩] at ha
state_before: case inr
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
a : Cardinal
ha : a < beth o
⊢ 2 ^ a < beth o

tactic: rcases exists_lt_of_lt_ciSup' ha with ⟨⟨i, hi⟩, ha⟩
state_before: case inr
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
a : Cardinal
ha : a < ⨆ (a : ↑(Iio o)), beth ↑a
⊢ 2 ^ a < beth o

tactic: have := power_le_power_left two_ne_zero ha.le
state_before: case inr.intro.mk
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
a : Cardinal
ha✝ : a < ⨆ (a : ↑(Iio o)), beth ↑a
i : Ordinal
hi : i ∈ Iio o
ha : a < beth ↑{ val := i, property := hi }
⊢ 2 ^ a < beth o

tactic: rw [← beth_succ] at this
state_before: case inr.intro.mk
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
a : Cardinal
ha✝ : a < ⨆ (a : ↑(Iio o)), beth ↑a
i : Ordinal
hi : i ∈ Iio o
ha : a < beth ↑{ val := i, property := hi }
this : 2 ^ a ≤ 2 ^ beth ↑{ val := i, property := hi }
⊢ 2 ^ a < beth o

tactic: exact this.trans_lt (beth_lt.2 (H.succ_lt hi))
state_before: case inr.intro.mk
α : Type ?u.114391
r : α → α → Prop
o : Ordinal
H : IsSuccLimit o
h : o ≠ 0
a : Cardinal
ha✝ : a < ⨆ (a : ↑(Iio o)), beth ↑a
i : Ordinal
hi : i ∈ Iio o
ha : a < beth ↑{ val := i, property := hi }
this : 2 ^ a ≤ beth (succ ↑{ val := i, property := hi })
⊢ 2 ^ a < beth o
Theorem: Monoid.pow_eq_mod_exponent
File: Mathlib/GroupTheory/Exponent.lean

tactic: rw [Nat.mod_add_div]
state_before: G : Type u
inst✝ : Monoid G
n : ℕ
g : G
⊢ g ^ n = g ^ (n % exponent G + exponent G * (n / exponent G))

tactic: simp [pow_add, pow_mul, pow_exponent_eq_one]
state_before: G : Type u
inst✝ : Monoid G
n : ℕ
g : G
⊢ g ^ (n % exponent G + exponent G * (n / exponent G)) = g ^ (n % exponent G)
Theorem: Finset.prod_filter_mul_prod_filter_not
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: have := Classical.decEq α
state_before: ι : Type ?u.288824
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
s : Finset α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : (x : α) → Decidable ¬p x
f : α → β
⊢ (∏ x in filter p s, f x) * ∏ x in filter (fun x => ¬p x) s, f x = ∏ x in s, f x

tactic: rw [← prod_union (disjoint_filter_filter_neg s s p), filter_union_filter_neg_eq]
state_before: ι : Type ?u.288824
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
s : Finset α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : (x : α) → Decidable ¬p x
f : α → β
this : DecidableEq α
⊢ (∏ x in filter p s, f x) * ∏ x in filter (fun x => ¬p x) s, f x = ∏ x in s, f x
Theorem: CategoryTheory.IsPushout.IsVanKampen.mono_of_mono_right
File: Mathlib/CategoryTheory/Adhesive.lean

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono g
H : IsPushout f g h i
H' : IsVanKampen H
⊢ f ≫ 𝟙 X = 𝟙 W ≫ f

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono g
H : IsPushout f g h i
H' : IsVanKampen H
⊢ f ≫ 𝟙 X = 𝟙 W ≫ f

tactic: simp
state_before: J : Type v'
inst✝² : Category J
C : Type u
inst✝¹ : Category C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono g
H : IsPushout f g h i
H' : IsVanKampen H
⊢ f ≫ 𝟙 X = 𝟙 W ≫ f
Theorem: Set.image_mul_right'
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simp
state_before: F : Type ?u.125686
α : Type u_1
β : Type ?u.125692
γ : Type ?u.125695
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun x => x * b⁻¹) '' t = (fun x => x * b) ⁻¹' t
Theorem: midpoint_eq_midpoint_iff_vsub_eq_vsub
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [← @vsub_eq_zero_iff_eq V, midpoint_vsub_midpoint, midpoint_eq_iff, pointReflection_apply,
  vsub_eq_sub, zero_sub, vadd_eq_add, add_zero, neg_eq_iff_eq_neg, neg_vsub_eq_vsub_rev]
state_before: R : Type u_2
V : Type u_3
V' : Type ?u.99989
P : Type u_1
P' : Type ?u.99995
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z x x' y y' : P
⊢ midpoint R x y = midpoint R x' y' ↔ x -ᵥ x' = y' -ᵥ y
Theorem: Primrec.encode
File: Mathlib/Computability/Primrec.lean

tactic: cases @decode α _ n <;> rfl
state_before: α : Type u_1
β : Type ?u.18969
σ : Type ?u.18972
inst✝² : Primcodable α
inst✝¹ : Primcodable β
inst✝ : Primcodable σ
n : ℕ
⊢ encode (decode n) = encode (Option.map encode (decode n))
Theorem: Quaternion.normSq_nat_cast
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [← coe_nat_cast, normSq_coe]
state_before: S : Type ?u.633387
T : Type ?u.633390
R : Type u_1
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
n : ℕ
⊢ ↑normSq ↑n = ↑n ^ 2
Theorem: Metric.bounded_empty
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp
state_before: α : Type u
β : Type v
X : Type ?u.484689
ι : Type ?u.484692
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
⊢ ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ ∅ → dist x y ≤ 0
Theorem: PowerSeries.monomial_zero_eq_C_apply
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simp
state_before: R : Type u_1
inst✝ : Semiring R
a : R
⊢ ↑(monomial R 0) a = ↑(C R) a
Theorem: Int.add_modEq_right
File: Mathlib/Data/Int/ModEq.lean

tactic: simp
state_before: m n a b c d : ℤ
⊢ n ∣ a + n - a
Theorem: Finsupp.subtypeDomain_eq_zero_iff'
File: Mathlib/Data/Finsupp/Basic.lean

tactic: classical simp_rw [← support_eq_empty, support_subtypeDomain, subtype_eq_empty,
    not_mem_support_iff]
state_before: α : Type u_1
β : Type ?u.486127
γ : Type ?u.486130
ι : Type ?u.486133
M : Type u_2
M' : Type ?u.486139
N : Type ?u.486142
P : Type ?u.486145
G : Type ?u.486148
H : Type ?u.486151
R : Type ?u.486154
S : Type ?u.486157
inst✝ : Zero M
p : α → Prop
f : α →₀ M
⊢ subtypeDomain p f = 0 ↔ ∀ (x : α), p x → ↑f x = 0

tactic: simp_rw [← support_eq_empty, support_subtypeDomain, subtype_eq_empty,
not_mem_support_iff]
state_before: α : Type u_1
β : Type ?u.486127
γ : Type ?u.486130
ι : Type ?u.486133
M : Type u_2
M' : Type ?u.486139
N : Type ?u.486142
P : Type ?u.486145
G : Type ?u.486148
H : Type ?u.486151
R : Type ?u.486154
S : Type ?u.486157
inst✝ : Zero M
p : α → Prop
f : α →₀ M
⊢ subtypeDomain p f = 0 ↔ ∀ (x : α), p x → ↑f x = 0
Theorem: TopologicalSpace.secondCountableTopology_induced
File: Mathlib/Topology/Bases.lean

tactic: rcases @SecondCountableTopology.is_open_generated_countable β _ _ with ⟨b, hb, eq⟩
state_before: α : Type u
t✝ : TopologicalSpace α
β : Type u_1
t : TopologicalSpace β
inst✝ : SecondCountableTopology β
f : α → β
⊢ SecondCountableTopology α

tactic: letI := t.induced f
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
β : Type u_1
t : TopologicalSpace β
inst✝ : SecondCountableTopology β
f : α → β
b : Set (Set β)
hb : Set.Countable b
eq : t = generateFrom b
⊢ SecondCountableTopology α

tactic: refine' { is_open_generated_countable := ⟨preimage f '' b, hb.image _, _⟩ }
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
β : Type u_1
t : TopologicalSpace β
inst✝ : SecondCountableTopology β
f : α → β
b : Set (Set β)
hb : Set.Countable b
eq : t = generateFrom b
this : TopologicalSpace α := induced f t
⊢ SecondCountableTopology α

tactic: rw [eq, induced_generateFrom_eq]
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
β : Type u_1
t : TopologicalSpace β
inst✝ : SecondCountableTopology β
f : α → β
b : Set (Set β)
hb : Set.Countable b
eq : t = generateFrom b
this : TopologicalSpace α := induced f t
⊢ induced f t = generateFrom (preimage f '' b)
Theorem: vectorSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simp_rw [vectorSpan_eq_span_vsub_set_left k (mem_insert p₁ _), image_pair, vsub_self,
  Submodule.span_insert_zero]
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.358935
p₁ p₂ : P
⊢ vectorSpan k {p₁, p₂} = Submodule.span k {p₁ -ᵥ p₂}
Theorem: Submodule.map_subtype_le
File: Mathlib/LinearAlgebra/Basic.lean

tactic: simpa using (map_le_range : map p.subtype p' ≤ range p.subtype)
state_before: R : Type u_1
R₁ : Type ?u.1536535
R₂ : Type ?u.1536538
R₃ : Type ?u.1536541
R₄ : Type ?u.1536544
S : Type ?u.1536547
K : Type ?u.1536550
K₂ : Type ?u.1536553
M : Type u_2
M' : Type ?u.1536559
M₁ : Type ?u.1536562
M₂ : Type ?u.1536565
M₃ : Type ?u.1536568
M₄ : Type ?u.1536571
N : Type ?u.1536574
N₂ : Type ?u.1536577
ι : Type ?u.1536580
V : Type ?u.1536583
V₂ : Type ?u.1536586
inst✝⁵ : Semiring R
inst✝⁴ : Semiring R₂
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R M
inst✝ : Module R₂ M₂
p p'✝ : Submodule R M
q : Submodule R₂ M₂
τ₁₂ : R →+* R₂
F : Type ?u.1536760
sc : SemilinearMapClass F τ₁₂ M M₂
p' : Submodule R { x // x ∈ p }
⊢ map (Submodule.subtype p) p' ≤ p
Theorem: List.map_reverse_inits
File: Mathlib/Data/List/Infix.lean

tactic: rw [inits_eq_tails l]
state_before: α : Type u_1
β : Type ?u.47694
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ map reverse (inits l) = reverse (tails (reverse l))

tactic: simp [reverse_involutive.comp_self, reverse_map]
state_before: α : Type u_1
β : Type ?u.47694
l✝ l₁ l₂ l₃ : List α
a b : α
m n : ℕ
l : List α
⊢ map reverse (reverse (map reverse (tails (reverse l)))) = reverse (tails (reverse l))
Theorem: modulePolynomialOfEndo_smul_def
File: Mathlib/RingTheory/FiniteType.lean

tactic: letI := modulePolynomialOfEndo f
state_before: R : Type ?u.726463
inst✝² : CommRing R
M : Type ?u.726469
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
n : R[X]
a : M
⊢ HSMul R[X] M ((fun x => M) a)

tactic: infer_instance
state_before: R : Type ?u.726463
inst✝² : CommRing R
M : Type ?u.726469
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f : M →ₗ[R] M
n : R[X]
a : M
this : Module R[X] M := modulePolynomialOfEndo f
⊢ HSMul R[X] M ((fun x => M) a)
Theorem: LiouvilleWith.add_int_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [← Rat.cast_coe_int m, add_rat_iff]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
⊢ LiouvilleWith p (x + ↑m) ↔ LiouvilleWith p x
Theorem: Polynomial.Monic.of_mul_monic_left
File: Mathlib/Data/Polynomial/Monic.lean

tactic: contrapose! hpq
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
hpq : Monic (p * q)
⊢ Monic q

tactic: rw [Monic.def] at hpq⊢
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
hpq : ¬Monic q
⊢ ¬Monic (p * q)

tactic: rwa [leadingCoeff_monic_mul hp]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : Monic p
hpq : ¬Polynomial.leadingCoeff q = 1
⊢ ¬Polynomial.leadingCoeff (p * q) = 1
Theorem: MvPolynomial.exists_restrict_to_vars
File: Mathlib/Data/MvPolynomial/Supported.lean

tactic: rw [← mem_supported, supported_eq_range_rename, AlgHom.mem_range] at hF
state_before: σ : Type u_2
τ : Type ?u.131145
R✝ : Type u
S : Type v
r : R✝
e : ℕ
n m : σ
inst✝¹ : CommSemiring R✝
p q : MvPolynomial σ R✝
s t : Set σ
R : Type u_1
inst✝ : CommRing R
F : MvPolynomial σ ℤ
hF : ↑(vars F) ⊆ s
⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F

tactic: cases' hF with F' hF'
state_before: σ : Type u_2
τ : Type ?u.131145
R✝ : Type u
S : Type v
r : R✝
e : ℕ
n m : σ
inst✝¹ : CommSemiring R✝
p q : MvPolynomial σ R✝
s t : Set σ
R : Type u_1
inst✝ : CommRing R
F : MvPolynomial σ ℤ
hF : ∃ x, ↑(rename Subtype.val) x = F
⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F

tactic: use fun z ↦ aeval z F'
state_before: case intro
σ : Type u_2
τ : Type ?u.131145
R✝ : Type u
S : Type v
r : R✝
e : ℕ
n m : σ
inst✝¹ : CommSemiring R✝
p q : MvPolynomial σ R✝
s t : Set σ
R : Type u_1
inst✝ : CommRing R
F : MvPolynomial σ ℤ
F' : MvPolynomial { x // x ∈ s } ℤ
hF' : ↑(rename Subtype.val) F' = F
⊢ ∃ f, ∀ (x : σ → R), f (x ∘ Subtype.val) = ↑(aeval x) F

tactic: intro x
state_before: case intro
σ : Type u_2
τ : Type ?u.131145
R✝ : Type u
S : Type v
r : R✝
e : ℕ
n m : σ
inst✝¹ : CommSemiring R✝
p q : MvPolynomial σ R✝
s t : Set σ
R : Type u_1
inst✝ : CommRing R
F : MvPolynomial σ ℤ
F' : MvPolynomial { x // x ∈ s } ℤ
hF' : ↑(rename Subtype.val) F' = F
⊢ ∀ (x : σ → R), (fun z => ↑(aeval z) F') (x ∘ Subtype.val) = ↑(aeval x) F

tactic: simp only [← hF', aeval_rename]
state_before: case intro
σ : Type u_2
τ : Type ?u.131145
R✝ : Type u
S : Type v
r : R✝
e : ℕ
n m : σ
inst✝¹ : CommSemiring R✝
p q : MvPolynomial σ R✝
s t : Set σ
R : Type u_1
inst✝ : CommRing R
F : MvPolynomial σ ℤ
F' : MvPolynomial { x // x ∈ s } ℤ
hF' : ↑(rename Subtype.val) F' = F
x : σ → R
⊢ (fun z => ↑(aeval z) F') (x ∘ Subtype.val) = ↑(aeval x) F
Theorem: List.nil_diff
File: Std/Data/List/Lemmas.lean

tactic: induction l <;> simp [*, erase_of_not_mem]
state_before: α : Type u_1
inst✝ : DecidableEq α
l : List α
⊢ List.diff [] l = []
Theorem: Ordnode.Raised.add_right
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [add_comm, add_comm m]
state_before: α : Type ?u.244728
k n m : ℕ
H : Raised n m
⊢ Raised (n + k) (m + k)

tactic: exact H.add_left _
state_before: α : Type ?u.244728
k n m : ℕ
H : Raised n m
⊢ Raised (k + n) (k + m)
Theorem: vadd_mem_spanPoints_of_mem_spanPoints_of_mem_vectorSpan
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rcases hp with ⟨p2, ⟨hp2, ⟨v2, ⟨hv2, hv2p⟩⟩⟩⟩
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
p : P
v : V
hp : p ∈ spanPoints k s
hv : v ∈ vectorSpan k s
⊢ v +ᵥ p ∈ spanPoints k s

tactic: rw [hv2p, vadd_vadd]
state_before: case intro.intro.intro.intro
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
p : P
v : V
hv : v ∈ vectorSpan k s
p2 : P
hp2 : p2 ∈ s
v2 : V
hv2 : v2 ∈ vectorSpan k s
hv2p : p = v2 +ᵥ p2
⊢ v +ᵥ p ∈ spanPoints k s

tactic: exact ⟨p2, hp2, v + v2, (vectorSpan k s).add_mem hv hv2, rfl⟩
state_before: case intro.intro.intro.intro
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
p : P
v : V
hv : v ∈ vectorSpan k s
p2 : P
hp2 : p2 ∈ s
v2 : V
hv2 : v2 ∈ vectorSpan k s
hv2p : p = v2 +ᵥ p2
⊢ v + v2 +ᵥ p2 ∈ spanPoints k s
Theorem: Equiv.Perm.cycleFactorsFinset_eq_finset
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: obtain ⟨l, hl, rfl⟩ := s.exists_list_nodup_eq
state_before: ι : Type ?u.2683291
α : Type u_1
β : Type ?u.2683297
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f σ : Perm α
s : Finset (Perm α)
⊢ cycleFactorsFinset σ = s ↔
    (∀ (f : Perm α), f ∈ s → IsCycle f) ∧
      ∃ h, noncommProd s id (_ : Set.Pairwise ↑s fun a b => _root_.Commute (id a) (id b)) = σ

tactic: simp [cycleFactorsFinset_eq_list_toFinset, hl]
state_before: case intro.intro
ι : Type ?u.2683291
α : Type u_1
β : Type ?u.2683297
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f σ : Perm α
l : List (Perm α)
hl : List.Nodup l
⊢ cycleFactorsFinset σ = List.toFinset l ↔
    (∀ (f : Perm α), f ∈ List.toFinset l → IsCycle f) ∧
      ∃ h,
        noncommProd (List.toFinset l) id (_ : Set.Pairwise ↑(List.toFinset l) fun a b => _root_.Commute (id a) (id b)) =
          σ
Theorem: Real.sSup_smul_of_nonpos
File: Mathlib/Data/Real/Pointwise.lean

tactic: obtain rfl | hs := s.eq_empty_or_nonempty
state_before: ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
s : Set ℝ
⊢ sSup (a • s) = a • sInf s

tactic: obtain rfl | ha' := ha.eq_or_lt
state_before: case inr
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
s : Set ℝ
hs : Set.Nonempty s
⊢ sSup (a • s) = a • sInf s

tactic: by_cases h : BddBelow s
state_before: case inr.inr
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
s : Set ℝ
hs : Set.Nonempty s
ha' : a < 0
⊢ sSup (a • s) = a • sInf s

tactic: rw [smul_set_empty, Real.sSup_empty, Real.sInf_empty, smul_zero]
state_before: case inl
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
⊢ sSup (a • ∅) = a • sInf ∅

tactic: rw [zero_smul_set hs, zero_smul]
state_before: case inr.inl
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
s : Set ℝ
hs : Set.Nonempty s
ha : 0 ≤ 0
⊢ sSup (0 • s) = 0 • sInf s

tactic: exact csSup_singleton 0
state_before: case inr.inl
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
s : Set ℝ
hs : Set.Nonempty s
ha : 0 ≤ 0
⊢ sSup 0 = 0

tactic: exact ((OrderIso.smulLeftDual ℝ ha').map_csInf' hs h).symm
state_before: case pos
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
s : Set ℝ
hs : Set.Nonempty s
ha' : a < 0
h : BddBelow s
⊢ sSup (a • s) = a • sInf s

tactic: rw [Real.sSup_of_not_bddAbove (mt (bddAbove_smul_iff_of_neg ha').1 h),
    Real.sInf_of_not_bddBelow h, smul_zero]
state_before: case neg
ι : Sort ?u.10683
α : Type u_1
inst✝² : LinearOrderedField α
inst✝¹ : Module α ℝ
inst✝ : OrderedSMul α ℝ
a : α
ha : a ≤ 0
s : Set ℝ
hs : Set.Nonempty s
ha' : a < 0
h : ¬BddBelow s
⊢ sSup (a • s) = a • sInf s
Theorem: List.reverseAux_eq_append
File: src/lean/Init/Data/List/Basic.lean

tactic: induction as generalizing bs with
| nil => simp [reverseAux]
| cons a as ih =>
  simp [reverseAux]
  rw [ih (a :: bs), ih [a], append_assoc]
  rfl
state_before: α : Type u
β : Type v
γ : Type w
as bs : List α
⊢ reverseAux as bs = reverseAux as nil ++ bs

tactic: simp [reverseAux]
state_before: case nil
α : Type u
β : Type v
γ : Type w
bs : List α
⊢ reverseAux nil bs = reverseAux nil nil ++ bs

tactic: simp [reverseAux]
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (bs : List α), reverseAux as bs = reverseAux as nil ++ bs
bs : List α
⊢ reverseAux (a :: as) bs = reverseAux (a :: as) nil ++ bs

tactic: rw [ih (a :: bs), ih [a], append_assoc]
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (bs : List α), reverseAux as bs = reverseAux as nil ++ bs
bs : List α
⊢ reverseAux as (a :: bs) = reverseAux as (a :: nil) ++ bs

tactic: rfl
state_before: case cons
α : Type u
β : Type v
γ : Type w
a : α
as : List α
ih : ∀ (bs : List α), reverseAux as bs = reverseAux as nil ++ bs
bs : List α
⊢ reverseAux as nil ++ a :: bs = reverseAux as nil ++ (a :: nil ++ bs)
Theorem: Multiset.filterMap_filter
File: Mathlib/Data/Multiset/Basic.lean

tactic: simpa using List.filterMap_filter p f l
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.281796
p : α → Prop
inst✝ : DecidablePred p
f : α → Option β
s : Multiset α
l : List α
⊢ List.filterMap f (List.filter (fun b => decide (p b)) l) = List.filterMap (fun x => if p x then f x else none) l
Theorem: ProbabilityTheory.kernel.isSFiniteKernel_sum
File: Mathlib/Probability/Kernel/Basic.lean

tactic: cases fintypeOrInfinite ι
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: cases nonempty_denumerable ι
state_before: case inr
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
val✝ : Infinite ι
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: exact isSFiniteKernel_sum_of_denumerable hκs
state_before: case inr.intro
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
val✝¹ : Infinite ι
val✝ : Denumerable ι
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: rw [sum_fintype]
state_before: case inl
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
val✝ : Fintype ι
⊢ IsSFiniteKernel (kernel.sum κs)

tactic: exact IsSFiniteKernel.finset_sum Finset.univ fun i _ => hκs i
state_before: case inl
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ : { x // x ∈ kernel α β }
inst✝ : Countable ι
κs : ι → { x // x ∈ kernel α β }
hκs : ∀ (n : ι), IsSFiniteKernel (κs n)
val✝ : Fintype ι
⊢ IsSFiniteKernel (∑ i : ι, κs i)
Theorem: Matrix.toBilin_apply
File: Mathlib/LinearAlgebra/Matrix/BilinearForm.lean

tactic: rw [Matrix.toBilin, BilinForm.toMatrix, LinearEquiv.symm_trans_apply, ← Matrix.toBilin']
state_before: R : Type ?u.1104806
M✝ : Type ?u.1104809
inst✝¹⁷ : Semiring R
inst✝¹⁶ : AddCommMonoid M✝
inst✝¹⁵ : Module R M✝
R₁ : Type ?u.1104845
M₁ : Type ?u.1104848
inst✝¹⁴ : Ring R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_2
M₂ : Type u_3
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type ?u.1105647
M₃ : Type ?u.1105650
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type ?u.1106238
K : Type ?u.1106241
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B : BilinForm R M✝
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
n : Type u_1
o : Type ?u.1107458
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : DecidableEq n
b : Basis n R₂ M₂
M : Matrix n n R₂
x y : M₂
⊢ bilin (↑(toBilin b) M) x y = ∑ i : n, ∑ j : n, ↑(↑b.repr x) i * M i j * ↑(↑b.repr y) j

tactic: simp only [congr_symm, congr_apply, LinearEquiv.symm_symm, Matrix.toBilin'_apply,
  Basis.equivFun_apply]
state_before: R : Type ?u.1104806
M✝ : Type ?u.1104809
inst✝¹⁷ : Semiring R
inst✝¹⁶ : AddCommMonoid M✝
inst✝¹⁵ : Module R M✝
R₁ : Type ?u.1104845
M₁ : Type ?u.1104848
inst✝¹⁴ : Ring R₁
inst✝¹³ : AddCommGroup M₁
inst✝¹² : Module R₁ M₁
R₂ : Type u_2
M₂ : Type u_3
inst✝¹¹ : CommSemiring R₂
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : Module R₂ M₂
R₃ : Type ?u.1105647
M₃ : Type ?u.1105650
inst✝⁸ : CommRing R₃
inst✝⁷ : AddCommGroup M₃
inst✝⁶ : Module R₃ M₃
V : Type ?u.1106238
K : Type ?u.1106241
inst✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
B : BilinForm R M✝
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
n : Type u_1
o : Type ?u.1107458
inst✝² : Fintype n
inst✝¹ : Fintype o
inst✝ : DecidableEq n
b : Basis n R₂ M₂
M : Matrix n n R₂
x y : M₂
⊢ bilin (↑(LinearEquiv.symm (BilinForm.congr (Basis.equivFun b))) (↑toBilin' M)) x y =
    ∑ i : n, ∑ j : n, ↑(↑b.repr x) i * M i j * ↑(↑b.repr y) j