Skip to content

Commit

Permalink
Trigger CI for leanprover/lean4#3589
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Mar 11, 2024
2 parents da33bf6 + 0dd0194 commit b47cf33
Show file tree
Hide file tree
Showing 889 changed files with 8,062 additions and 5,737 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
git checkout toolchain/v4.6.0
git checkout toolchain/v4.7.0-rc1
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
git checkout toolchain/v4.6.0
git checkout toolchain/v4.7.0-rc1
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
git checkout toolchain/v4.6.0
git checkout toolchain/v4.7.0-rc1
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
git checkout toolchain/v4.6.0
git checkout toolchain/v4.7.0-rc1
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
Expand Down
2 changes: 1 addition & 1 deletion Archive/Examples/IfNormalization/Result.lean
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def normalize (l : AList (fun _ : ℕ => Bool)) :
· -- normalized
have := ht₃ v
have := he₃ v
split <;>
· -- lookup = none
have := ht₃ w
have := he₃ w
Expand Down
2 changes: 1 addition & 1 deletion Archive/Examples/PropEncodable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The next three functions make it easier to construct functions from a small
`Fin`.
-/

-- porting note: using `![_, _]` notation instead
-- Porting note: using `![_, _]` notation instead
#noalign prop_encodable.mk_fn0
#noalign prop_encodable.mk_fn1
#noalign prop_encodable.mk_fn2
Expand Down
2 changes: 1 addition & 1 deletion Archive/Imo/Imo1972Q5.lean
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ This is a more concise version of the proof proposed by Ruben Van de Velde.
-/
theorem imo1972_q5' (f g : ℝ → ℝ) (hf1 : ∀ x, ∀ y, f (x + y) + f (x - y) = 2 * f x * g y)
(hf2 : BddAbove (Set.range fun x => ‖f x‖)) (hf3 : ∃ x, f x ≠ 0) (y : ℝ) : ‖g y‖ ≤ 1 := by
-- porting note: moved `by_contra!` up to avoid a bug
-- Porting note: moved `by_contra!` up to avoid a bug
by_contra! H
obtain ⟨x, hx⟩ := hf3
set k := ⨆ x, ‖f x‖
Expand Down
6 changes: 3 additions & 3 deletions Archive/Imo/Imo1998Q2.lean
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Rearranging gives the result.
-/


-- porting note: `A` already upper case
-- Porting note: `A` already upper case
set_option linter.uppercaseLean3 false

open scoped Classical
Expand Down Expand Up @@ -140,7 +140,7 @@ theorem A_fibre_over_judgePair {p : JudgePair J} (h : p.Distinct) :
AgreedTriple.contestant := by
dsimp only [A, agreedContestants]; ext c; constructor <;> intro h
· rw [Finset.mem_image]; refine' ⟨⟨c, p⟩, _⟩; aesop
-- porting note: this used to be `finish`
-- Porting note: this used to be `finish`
· simp only [Finset.mem_filter, Finset.mem_image, Prod.exists] at h
rcases h with ⟨_, ⟨_, ⟨_, ⟨h, _⟩⟩⟩⟩
cases h; aesop
Expand Down Expand Up @@ -230,7 +230,7 @@ end
theorem clear_denominators {a b k : ℕ} (ha : 0 < a) (hb : 0 < b) :
(b - 1 : ℚ) / (2 * b) ≤ k / a ↔ ((b : ℕ) - 1) * a ≤ k * (2 * b) := by
rw [div_le_div_iff]
-- porting note: proof used to finish with `<;> norm_cast <;> simp [ha, hb]`
-- Porting note: proof used to finish with `<;> norm_cast <;> simp [ha, hb]`
· convert Nat.cast_le (α := ℚ)
· aesop
· norm_cast
Expand Down
4 changes: 2 additions & 2 deletions Archive/Imo/Imo2013Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ open scoped BigOperators

namespace Imo2013Q1

-- porting note: simplified proof using `positivity`
-- Porting note: simplified proof using `positivity`
theorem arith_lemma (k n : ℕ) : 0 < 2 * n + 2 ^ k.succ := by positivity
#align imo2013_q1.arith_lemma Imo2013Q1.arith_lemma

Expand Down Expand Up @@ -75,7 +75,7 @@ theorem imo2013_q1 (n : ℕ+) (k : ℕ) :
field_simp
ring
_ = (1 + 1 / (2 * t + 2 ^ pk.succ)) * (1 + (2 ^ pk - 1) / t_succ) := by
-- porting note: used to work with `norm_cast`
-- Porting note: used to work with `norm_cast`
simp only [t_succ, PNat.mk_coe, Nat.cast_add, Nat.cast_one, mul_eq_mul_right_iff]
left
rfl
Expand Down
2 changes: 1 addition & 1 deletion Archive/MiuLanguage/DecisionNec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ theorem mod3_eq_1_or_mod3_eq_2 {a b : ℕ} (h1 : a % 3 = 1 ∨ a % 3 = 2)
· rw [h2]; exact h1
· cases' h1 with h1 h1
· right; simp [h2, mul_mod, h1, Nat.succ_lt_succ]
· left; simp only [h2, mul_mod, h1, mod_mod]; decide
· left; simp only [h2, mul_mod, h1, mod_mod]
#align miu.mod3_eq_1_or_mod3_eq_2 Miu.mod3_eq_1_or_mod3_eq_2

/-- `count_equiv_one_or_two_mod3_of_derivable` shows any derivable string must have a `count I` that
Expand Down
2 changes: 1 addition & 1 deletion Counterexamples/HomogeneousPrimeNotPrime.lean
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ instance : GradedAlgebra (grading R) where
left_inv := by convert grading.left_inv
right_inv := by convert grading.right_inv

-- porting note: `I` upper case
-- Porting note: `I` upper case
set_option linter.uppercaseLean3 false

/-- The counterexample is the ideal `I = span {(2, 2)}`. -/
Expand Down
2 changes: 1 addition & 1 deletion Counterexamples/SorgenfreyLine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ noncomputable section
/-- The Sorgenfrey line. It is the real line with the topology space structure generated by
half-open intervals `Set.Ico a b`. -/
def SorgenfreyLine : Type := ℝ
-- porting note: was deriving ConditionallyCompleteLinearOrder, LinearOrderedField, Archimedean
-- Porting note: was deriving ConditionallyCompleteLinearOrder, LinearOrderedField, Archimedean
#align counterexample.sorgenfrey_line Counterexample.SorgenfreyLine

@[inherit_doc]
Expand Down
1 change: 0 additions & 1 deletion Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ example : ¬UniqueProds ℕ := by
rintro ⟨h⟩
refine' not_not.mpr (h (Finset.singleton_nonempty 0) (Finset.insert_nonempty 0 {1})) _
simp [UniqueMul, not_or]
exact ⟨⟨0, 1, by simp⟩, ⟨0, 0, by simp⟩⟩

/-- Some Types that do not have `UniqueSums`. -/
example (n : ℕ) (n2 : 2 ≤ n) : ¬UniqueSums (ZMod n) := by
Expand Down
17 changes: 16 additions & 1 deletion Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ import Mathlib.Algebra.Homology.HomotopyCategory.HomComplexShift
import Mathlib.Algebra.Homology.HomotopyCategory.MappingCone
import Mathlib.Algebra.Homology.HomotopyCategory.Pretriangulated
import Mathlib.Algebra.Homology.HomotopyCategory.Shift
import Mathlib.Algebra.Homology.HomotopyCategory.Triangulated
import Mathlib.Algebra.Homology.HomotopyCofiber
import Mathlib.Algebra.Homology.ImageToKernel
import Mathlib.Algebra.Homology.Linear
import Mathlib.Algebra.Homology.LocalCohomology
import Mathlib.Algebra.Homology.Localization
import Mathlib.Algebra.Homology.ModuleCat
Expand Down Expand Up @@ -778,6 +780,7 @@ import Mathlib.Analysis.Distribution.SchwartzSpace
import Mathlib.Analysis.Fourier.AddCircle
import Mathlib.Analysis.Fourier.FourierTransform
import Mathlib.Analysis.Fourier.FourierTransformDeriv
import Mathlib.Analysis.Fourier.Inversion
import Mathlib.Analysis.Fourier.PoissonSummation
import Mathlib.Analysis.Fourier.RiemannLebesgueLemma
import Mathlib.Analysis.Hofer
Expand Down Expand Up @@ -936,6 +939,7 @@ import Mathlib.Analysis.SpecialFunctions.Exponential
import Mathlib.Analysis.SpecialFunctions.Gamma.Basic
import Mathlib.Analysis.SpecialFunctions.Gamma.Beta
import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup
import Mathlib.Analysis.SpecialFunctions.Gamma.Deligne
import Mathlib.Analysis.SpecialFunctions.Gaussian
import Mathlib.Analysis.SpecialFunctions.ImproperIntegrals
import Mathlib.Analysis.SpecialFunctions.Integrals
Expand Down Expand Up @@ -1087,7 +1091,8 @@ import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Filtered.Connected
import Mathlib.CategoryTheory.Filtered.Final
import Mathlib.CategoryTheory.Filtered.Small
import Mathlib.CategoryTheory.FinCategory
import Mathlib.CategoryTheory.FinCategory.AsType
import Mathlib.CategoryTheory.FinCategory.Basic
import Mathlib.CategoryTheory.FintypeCat
import Mathlib.CategoryTheory.FullSubcategory
import Mathlib.CategoryTheory.Functor.Basic
Expand All @@ -1113,6 +1118,7 @@ import Mathlib.CategoryTheory.GradedObject
import Mathlib.CategoryTheory.GradedObject.Bifunctor
import Mathlib.CategoryTheory.GradedObject.Single
import Mathlib.CategoryTheory.GradedObject.Trifunctor
import Mathlib.CategoryTheory.GradedObject.Unitor
import Mathlib.CategoryTheory.Grothendieck
import Mathlib.CategoryTheory.Groupoid
import Mathlib.CategoryTheory.Groupoid.Basic
Expand Down Expand Up @@ -1164,6 +1170,7 @@ import Mathlib.CategoryTheory.Limits.FintypeCat
import Mathlib.CategoryTheory.Limits.Fubini
import Mathlib.CategoryTheory.Limits.FullSubcategory
import Mathlib.CategoryTheory.Limits.FunctorCategory
import Mathlib.CategoryTheory.Limits.FunctorToTypes
import Mathlib.CategoryTheory.Limits.HasLimits
import Mathlib.CategoryTheory.Limits.Indization.IndObject
import Mathlib.CategoryTheory.Limits.IsLimit
Expand Down Expand Up @@ -1832,6 +1839,7 @@ import Mathlib.Data.MvPolynomial.Cardinal
import Mathlib.Data.MvPolynomial.Comap
import Mathlib.Data.MvPolynomial.CommRing
import Mathlib.Data.MvPolynomial.Counit
import Mathlib.Data.MvPolynomial.Degrees
import Mathlib.Data.MvPolynomial.Derivation
import Mathlib.Data.MvPolynomial.Division
import Mathlib.Data.MvPolynomial.Equiv
Expand Down Expand Up @@ -2341,13 +2349,16 @@ import Mathlib.GroupTheory.Order.Min
import Mathlib.GroupTheory.OrderOfElement
import Mathlib.GroupTheory.PGroup
import Mathlib.GroupTheory.Perm.Basic
import Mathlib.GroupTheory.Perm.Closure
import Mathlib.GroupTheory.Perm.ClosureSwap
import Mathlib.GroupTheory.Perm.Cycle.Basic
import Mathlib.GroupTheory.Perm.Cycle.Concrete
import Mathlib.GroupTheory.Perm.Cycle.Factors
import Mathlib.GroupTheory.Perm.Cycle.PossibleTypes
import Mathlib.GroupTheory.Perm.Cycle.Type
import Mathlib.GroupTheory.Perm.DomMulAct
import Mathlib.GroupTheory.Perm.Fin
import Mathlib.GroupTheory.Perm.Finite
import Mathlib.GroupTheory.Perm.List
import Mathlib.GroupTheory.Perm.Option
import Mathlib.GroupTheory.Perm.Sign
Expand Down Expand Up @@ -2781,6 +2792,7 @@ import Mathlib.MeasureTheory.Integral.BoundedContinuousFunction
import Mathlib.MeasureTheory.Integral.CircleIntegral
import Mathlib.MeasureTheory.Integral.CircleTransform
import Mathlib.MeasureTheory.Integral.DivergenceTheorem
import Mathlib.MeasureTheory.Integral.DominatedConvergence
import Mathlib.MeasureTheory.Integral.ExpDecay
import Mathlib.MeasureTheory.Integral.FundThmCalculus
import Mathlib.MeasureTheory.Integral.Gamma
Expand Down Expand Up @@ -2896,6 +2908,7 @@ import Mathlib.NumberTheory.Cyclotomic.Basic
import Mathlib.NumberTheory.Cyclotomic.Discriminant
import Mathlib.NumberTheory.Cyclotomic.Embeddings
import Mathlib.NumberTheory.Cyclotomic.Gal
import Mathlib.NumberTheory.Cyclotomic.PID
import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
import Mathlib.NumberTheory.Cyclotomic.Rat
import Mathlib.NumberTheory.Dioph
Expand All @@ -2908,6 +2921,7 @@ import Mathlib.NumberTheory.EulerProduct.Basic
import Mathlib.NumberTheory.EulerProduct.DirichletLSeries
import Mathlib.NumberTheory.FLT.Basic
import Mathlib.NumberTheory.FLT.Four
import Mathlib.NumberTheory.FLT.Three
import Mathlib.NumberTheory.FermatPsp
import Mathlib.NumberTheory.FrobeniusNumber
import Mathlib.NumberTheory.FunctionField
Expand Down Expand Up @@ -3528,6 +3542,7 @@ import Mathlib.Tactic.FunProp.Types
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.GCongr.Core
import Mathlib.Tactic.GCongr.ForwardAttr
import Mathlib.Tactic.Generalize
import Mathlib.Tactic.GeneralizeProofs
import Mathlib.Tactic.Group
import Mathlib.Tactic.GuardGoalNums
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/AddTorsor.lean
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class AddTorsor (G : outParam (Type*)) (P : Type*) [outParam <| AddGroup G] exte
vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
#align add_torsor AddTorsor

attribute [instance 100] AddTorsor.nonempty -- porting note: removers `nolint instance_priority`
attribute [instance 100] AddTorsor.nonempty -- Porting note: removers `nolint instance_priority`

--Porting note: removed
-- Porting note: removed
--attribute [nolint dangerous_instance] AddTorsor.toVSub

/-- An `AddGroup G` is a torsor for itself. -/
Expand Down
16 changes: 8 additions & 8 deletions Mathlib/Algebra/Algebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ open BigOperators
section Prio

-- We set this priority to 0 later in this file
-- porting note: unsupported set_option extends_priority 200
-- Porting note: unsupported set_option extends_priority 200

/- control priority of
`instance [Algebra R A] : SMul R A` -/
/-- An associative unital `R`-algebra is a semiring `A` equipped with a map into its center `R → A`.
See the implementation notes in this file for discussion of the details of this definition.
-/
-- porting note: unsupported @[nolint has_nonempty_instance]
-- Porting note: unsupported @[nolint has_nonempty_instance]
class Algebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] extends SMul R A,
R →+* A where
commutes' : ∀ r x, toRingHom r * x = x * toRingHom r
Expand Down Expand Up @@ -194,7 +194,7 @@ theorem coe_sum {ι : Type*} {s : Finset ι} (a : ι → R) :
map_sum (algebraMap R A) a s
#align algebra_map.coe_sum algebraMap.coe_sum

-- porting note: removed attribute [to_additive] coe_prod; why should this be a `to_additive`?
-- Porting note: removed attribute [to_additive] coe_prod; why should this be a `to_additive`?

end CommSemiringCommSemiring

Expand Down Expand Up @@ -305,7 +305,7 @@ section Semiring
variable [CommSemiring R] [CommSemiring S]
variable [Semiring A] [Algebra R A] [Semiring B] [Algebra R B]

-- porting note: deleted a private lemma
-- Porting note: deleted a private lemma

-- We'll later use this to show `Algebra ℤ M` is a subsingleton.
/-- To prove two algebra structures on a fixed `[CommSemiring R] [Semiring A]` agree,
Expand Down Expand Up @@ -334,7 +334,7 @@ instance (priority := 200) toModule : Module R A where
zero_smul := by simp [smul_def']
#align algebra.to_module Algebra.toModule

-- porting note: this caused deterministic timeouts later in mathlib3 but not in mathlib 4.
-- Porting note: this caused deterministic timeouts later in mathlib3 but not in mathlib 4.
-- attribute [instance 0] Algebra.toSMul

theorem smul_def (r : R) (x : A) : r • x = algebraMap R A r * x :=
Expand Down Expand Up @@ -530,7 +530,7 @@ theorem algebraMap_ofSubsemiring_apply (S : Subsemiring R) (x : S) : algebraMap

/-- Algebra over a subring. This builds upon `Subring.module`. -/
instance ofSubring {R A : Type*} [CommRing R] [Ring A] [Algebra R A] (S : Subring R) :
Algebra S A where -- porting note: don't use `toSubsemiring` because of a timeout
Algebra S A where -- Porting note: don't use `toSubsemiring` because of a timeout
toRingHom := (algebraMap R A).comp S.subtype
smul := (· • ·)
commutes' r x := Algebra.commutes (r : R) x
Expand Down Expand Up @@ -704,7 +704,7 @@ namespace RingHom

variable {R S : Type*}

-- porting note: changed `[Ring R] [Ring S]` to `[Semiring R] [Semiring S]`
-- Porting note: changed `[Ring R] [Ring S]` to `[Semiring R] [Semiring S]`
-- otherwise, Lean failed to find a `Subsingleton (ℚ →+* S)` instance
@[simp]
theorem map_rat_algebraMap [Semiring R] [Semiring S] [Algebra ℚ R] [Algebra ℚ S] (f : R →+* S)
Expand Down Expand Up @@ -896,7 +896,7 @@ variable (R)
#align linear_map.coe_restrict_scalars_eq_coe LinearMap.coe_restrictScalars
#align linear_map.coe_coe_is_scalar_tower LinearMap.coe_restrictScalars

-- porting note: todo: generalize to `CompatibleSMul`
-- Porting note: todo: generalize to `CompatibleSMul`
/-- `A`-linearly coerce an `R`-linear map from `M` to `A` to a function, given an algebra `A` over
a commutative semiring `R` and `M` a module over `R`. -/
def ltoFun (R : Type u) (M : Type v) (A : Type w) [CommSemiring R] [AddCommMonoid M] [Module R M]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Algebra/Bilinear.lean
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ theorem _root_.Algebra.lmul_isUnit_iff {x : A} :
@[simp]
theorem mulLeft_eq_zero_iff (a : A) : mulLeft R a = 0 ↔ a = 0 := by
constructor <;> intro h
-- porting note: had to supply `R` explicitly in `@mulLeft_apply` below
-- Porting note: had to supply `R` explicitly in `@mulLeft_apply` below
· rw [← mul_one a, ← @mulLeft_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply]
· rw [h]
exact mulLeft_zero_eq_zero
Expand All @@ -234,7 +234,7 @@ theorem mulLeft_eq_zero_iff (a : A) : mulLeft R a = 0 ↔ a = 0 := by
@[simp]
theorem mulRight_eq_zero_iff (a : A) : mulRight R a = 0 ↔ a = 0 := by
constructor <;> intro h
-- porting note: had to supply `R` explicitly in `@mulRight_apply` below
-- Porting note: had to supply `R` explicitly in `@mulRight_apply` below
· rw [← one_mul a, ← @mulRight_apply R _ _ _ _ _ _ a 1, h, LinearMap.zero_apply]
· rw [h]
exact mulRight_zero_eq_zero
Expand Down
Loading

0 comments on commit b47cf33

Please sign in to comment.