Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Nov 10, 2024
2 parents 831f105 + 5b47f11 commit 795b086
Show file tree
Hide file tree
Showing 354 changed files with 8,941 additions and 4,892 deletions.
17 changes: 17 additions & 0 deletions .github/build.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,23 @@ jobs:
scripts/lean-pr-testing-comments.sh lean
scripts/lean-pr-testing-comments.sh batteries
- name: build lean4checker, but don't run it
if: ${{ (always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
# Read lean-toolchain file and checkout appropriate branch
TOOLCHAIN=$(cat ../lean-toolchain)
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
VERSION=${TOOLCHAIN#leanprover/lean4:}
git checkout "$VERSION"
else
git checkout master
fi
# Build lean4checker using the same toolchain
cp ../lean-toolchain .
lake build
final:
name: Post-CI jobJOB_NAME
if: github.repository MAIN_OR_FORK 'leanprover-community/mathlib4'
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,23 @@ jobs:
scripts/lean-pr-testing-comments.sh lean
scripts/lean-pr-testing-comments.sh batteries
- name: build lean4checker, but don't run it
if: ${{ (always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
# Read lean-toolchain file and checkout appropriate branch
TOOLCHAIN=$(cat ../lean-toolchain)
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
VERSION=${TOOLCHAIN#leanprover/lean4:}
git checkout "$VERSION"
else
git checkout master
fi
# Build lean4checker using the same toolchain
cp ../lean-toolchain .
lake build
final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib4'
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,23 @@ jobs:
scripts/lean-pr-testing-comments.sh lean
scripts/lean-pr-testing-comments.sh batteries
- name: build lean4checker, but don't run it
if: ${{ (always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
# Read lean-toolchain file and checkout appropriate branch
TOOLCHAIN=$(cat ../lean-toolchain)
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
VERSION=${TOOLCHAIN#leanprover/lean4:}
git checkout "$VERSION"
else
git checkout master
fi
# Build lean4checker using the same toolchain
cp ../lean-toolchain .
lake build
final:
name: Post-CI job
if: github.repository == 'leanprover-community/mathlib4'
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,23 @@ jobs:
scripts/lean-pr-testing-comments.sh lean
scripts/lean-pr-testing-comments.sh batteries
- name: build lean4checker, but don't run it
if: ${{ (always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
# Read lean-toolchain file and checkout appropriate branch
TOOLCHAIN=$(cat ../lean-toolchain)
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
VERSION=${TOOLCHAIN#leanprover/lean4:}
git checkout "$VERSION"
else
git checkout master
fi
# Build lean4checker using the same toolchain
cp ../lean-toolchain .
lake build
final:
name: Post-CI job (fork)
if: github.repository != 'leanprover-community/mathlib4'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/lean4checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ jobs:
run: |
git clone https://github.com/leanprover/lean4checker
cd lean4checker
# This should be changed back to a version tag when
# anything subsequent to `v4.13.0-rc3` is released.
git checkout master
# Read lean-toolchain file and checkout appropriate branch
TOOLCHAIN=$(cat ../lean-toolchain)
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
VERSION=${TOOLCHAIN#leanprover/lean4:}
git checkout "$VERSION"
else
git checkout master
fi
# Now that the git hash is embedded in each olean,
# we need to compile lean4checker on the same toolchain
cp ../lean-toolchain .
Expand Down
8 changes: 4 additions & 4 deletions Archive/Wiedijk100Theorems/BuffonsNeedle.lean
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ include hl in
lemma short_needle_inter_eq (h : l ≤ d) (θ : ℝ) :
Set.Icc (-d / 2) (d / 2) ∩ Set.Icc (-θ.sin * l / 2) (θ.sin * l / 2) =
Set.Icc (-θ.sin * l / 2) (θ.sin * l / 2) := by
rw [Set.Icc_inter_Icc, inf_eq_min, sup_eq_max, max_div_div_right zero_le_two,
rw [Set.Icc_inter_Icc, max_div_div_right zero_le_two,
min_div_div_right zero_le_two, neg_mul, max_neg_neg, mul_comm,
min_eq_right (mul_le_of_le_of_le_one_of_nonneg h θ.sin_le_one hl.le)]

Expand Down Expand Up @@ -304,7 +304,7 @@ lemma integral_zero_to_arcsin_min :
have : Set.EqOn (fun θ => min d (θ.sin * l)) (Real.sin · * l) (Set.uIcc 0 (d / l).arcsin) := by
intro θ ⟨hθ₁, hθ₂⟩
have : 0 ≤ (d / l).arcsin := Real.arcsin_nonneg.mpr (div_nonneg hd.le hl.le)
simp only [sup_eq_max, inf_eq_min, min_eq_left this, max_eq_right this] at hθ₁ hθ₂
simp only [min_eq_left this, max_eq_right this] at hθ₁ hθ₂
have hθ_mem : θ ∈ Set.Ioc (-(π / 2)) (π / 2) := by
exact ⟨lt_of_lt_of_le (neg_lt_zero.mpr (div_pos Real.pi_pos two_pos)) hθ₁,
le_trans hθ₂ (d / l).arcsin_mem_Icc.right⟩
Expand All @@ -324,7 +324,7 @@ lemma integral_arcsin_to_pi_div_two_min (h : d ≤ l) :
wlog hθ_ne_pi_div_two : θ ≠ π / 2
· simp only [ne_eq, not_not] at hθ_ne_pi_div_two
simp only [hθ_ne_pi_div_two, Real.sin_pi_div_two, one_mul, min_eq_left h]
simp only [sup_eq_max, inf_eq_min, min_eq_left (d / l).arcsin_le_pi_div_two,
simp only [min_eq_left (d / l).arcsin_le_pi_div_two,
max_eq_right (d / l).arcsin_le_pi_div_two] at hθ₁ hθ₂
have hθ_mem : θ ∈ Set.Ico (-(π / 2)) (π / 2) := by
exact ⟨le_trans (Real.arcsin_mem_Icc (d / l)).left hθ₁, lt_of_le_of_ne hθ₂ hθ_ne_pi_div_two⟩
Expand All @@ -340,7 +340,7 @@ theorem buffon_long (h : d ≤ l) :
simp only [
buffon_integral d l hd B hBₘ hB, MeasureTheory.integral_const, smul_eq_mul, mul_one,
MeasurableSet.univ, Measure.restrict_apply, Set.univ_inter, Set.Icc_inter_Icc, Real.volume_Icc,
sup_eq_max, inf_eq_min, min_div_div_right zero_le_two d, max_div_div_right zero_le_two (-d),
min_div_div_right zero_le_two d, max_div_div_right zero_le_two (-d),
div_sub_div_same, neg_mul, max_neg_neg, sub_neg_eq_add, ← mul_two,
mul_div_cancel_right₀ (min d (Real.sin _ * l)) two_ne_zero
]
Expand Down
19 changes: 16 additions & 3 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ import Mathlib.Algebra.Tropical.BigOperators
import Mathlib.Algebra.Tropical.Lattice
import Mathlib.Algebra.Vertex.HVertexOperator
import Mathlib.AlgebraicGeometry.AffineScheme
import Mathlib.AlgebraicGeometry.Cover.MorphismProperty
import Mathlib.AlgebraicGeometry.Cover.Open
import Mathlib.AlgebraicGeometry.EllipticCurve.Affine
import Mathlib.AlgebraicGeometry.EllipticCurve.DivisionPolynomial.Basic
Expand Down Expand Up @@ -1155,6 +1156,7 @@ import Mathlib.Analysis.Complex.Liouville
import Mathlib.Analysis.Complex.LocallyUniformLimit
import Mathlib.Analysis.Complex.OpenMapping
import Mathlib.Analysis.Complex.OperatorNorm
import Mathlib.Analysis.Complex.Periodic
import Mathlib.Analysis.Complex.PhragmenLindelof
import Mathlib.Analysis.Complex.Polynomial.Basic
import Mathlib.Analysis.Complex.Polynomial.UnitTrinomial
Expand All @@ -1180,7 +1182,6 @@ import Mathlib.Analysis.Convex.Birkhoff
import Mathlib.Analysis.Convex.Body
import Mathlib.Analysis.Convex.Caratheodory
import Mathlib.Analysis.Convex.Combination
import Mathlib.Analysis.Convex.Complex
import Mathlib.Analysis.Convex.Cone.Basic
import Mathlib.Analysis.Convex.Cone.Closure
import Mathlib.Analysis.Convex.Cone.Extension
Expand Down Expand Up @@ -1574,6 +1575,7 @@ import Mathlib.CategoryTheory.Closed.Monoidal
import Mathlib.CategoryTheory.Closed.Types
import Mathlib.CategoryTheory.Closed.Zero
import Mathlib.CategoryTheory.ClosedUnderIsomorphisms
import Mathlib.CategoryTheory.CodiscreteCategory
import Mathlib.CategoryTheory.CofilteredSystem
import Mathlib.CategoryTheory.CommSq
import Mathlib.CategoryTheory.Comma.Arrow
Expand Down Expand Up @@ -1629,6 +1631,7 @@ import Mathlib.CategoryTheory.FiberedCategory.HomLift
import Mathlib.CategoryTheory.Filtered.Basic
import Mathlib.CategoryTheory.Filtered.Connected
import Mathlib.CategoryTheory.Filtered.Final
import Mathlib.CategoryTheory.Filtered.Grothendieck
import Mathlib.CategoryTheory.Filtered.OfColimitCommutesFiniteLimit
import Mathlib.CategoryTheory.Filtered.Small
import Mathlib.CategoryTheory.FinCategory.AsType
Expand Down Expand Up @@ -1875,7 +1878,6 @@ import Mathlib.CategoryTheory.Monoidal.Free.Basic
import Mathlib.CategoryTheory.Monoidal.Free.Coherence
import Mathlib.CategoryTheory.Monoidal.Functor
import Mathlib.CategoryTheory.Monoidal.FunctorCategory
import Mathlib.CategoryTheory.Monoidal.Functorial
import Mathlib.CategoryTheory.Monoidal.Hopf_
import Mathlib.CategoryTheory.Monoidal.Internal.FunctorCategory
import Mathlib.CategoryTheory.Monoidal.Internal.Limits
Expand Down Expand Up @@ -2033,6 +2035,7 @@ import Mathlib.CategoryTheory.Sites.Whiskering
import Mathlib.CategoryTheory.Skeletal
import Mathlib.CategoryTheory.SmallObject.Construction
import Mathlib.CategoryTheory.SmallObject.Iteration.Basic
import Mathlib.CategoryTheory.SmallObject.Iteration.UniqueHom
import Mathlib.CategoryTheory.Square
import Mathlib.CategoryTheory.Subobject.Basic
import Mathlib.CategoryTheory.Subobject.Comma
Expand Down Expand Up @@ -2280,6 +2283,7 @@ import Mathlib.Data.ENNReal.Lemmas
import Mathlib.Data.ENNReal.Operations
import Mathlib.Data.ENNReal.Real
import Mathlib.Data.ENat.Basic
import Mathlib.Data.ENat.BigOperators
import Mathlib.Data.ENat.Lattice
import Mathlib.Data.Erased
import Mathlib.Data.FP.Basic
Expand Down Expand Up @@ -2389,6 +2393,7 @@ import Mathlib.Data.FunLike.Embedding
import Mathlib.Data.FunLike.Equiv
import Mathlib.Data.FunLike.Fintype
import Mathlib.Data.Holor
import Mathlib.Data.Ineq
import Mathlib.Data.Int.AbsoluteValue
import Mathlib.Data.Int.Associated
import Mathlib.Data.Int.Bitwise
Expand Down Expand Up @@ -3617,6 +3622,7 @@ import Mathlib.NumberTheory.DiophantineApproximation
import Mathlib.NumberTheory.DirichletCharacter.Basic
import Mathlib.NumberTheory.DirichletCharacter.Bounds
import Mathlib.NumberTheory.DirichletCharacter.GaussSum
import Mathlib.NumberTheory.DirichletCharacter.Orthogonality
import Mathlib.NumberTheory.Divisors
import Mathlib.NumberTheory.EllipticDivisibilitySequence
import Mathlib.NumberTheory.EulerProduct.Basic
Expand Down Expand Up @@ -3688,13 +3694,16 @@ import Mathlib.NumberTheory.ModularForms.JacobiTheta.TwoVariable
import Mathlib.NumberTheory.ModularForms.SlashActions
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
import Mathlib.NumberTheory.MulChar.Basic
import Mathlib.NumberTheory.MulChar.Duality
import Mathlib.NumberTheory.MulChar.Lemmas
import Mathlib.NumberTheory.Multiplicity
import Mathlib.NumberTheory.NumberField.AdeleRing
import Mathlib.NumberTheory.NumberField.Basic
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody
import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone
import Mathlib.NumberTheory.NumberField.ClassNumber
import Mathlib.NumberTheory.NumberField.Completion
import Mathlib.NumberTheory.NumberField.Discriminant.Basic
import Mathlib.NumberTheory.NumberField.Discriminant.Defs
import Mathlib.NumberTheory.NumberField.Embeddings
Expand Down Expand Up @@ -4090,6 +4099,7 @@ import Mathlib.RingTheory.Fintype
import Mathlib.RingTheory.Flat.Algebra
import Mathlib.RingTheory.Flat.Basic
import Mathlib.RingTheory.Flat.CategoryTheory
import Mathlib.RingTheory.Flat.Equalizer
import Mathlib.RingTheory.Flat.EquationalCriterion
import Mathlib.RingTheory.Flat.FaithfullyFlat
import Mathlib.RingTheory.Flat.Localization
Expand Down Expand Up @@ -4295,6 +4305,7 @@ import Mathlib.RingTheory.RingHom.StandardSmooth
import Mathlib.RingTheory.RingHom.Surjective
import Mathlib.RingTheory.RingHomProperties
import Mathlib.RingTheory.RingInvo
import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed
import Mathlib.RingTheory.RootsOfUnity.Basic
import Mathlib.RingTheory.RootsOfUnity.Complex
import Mathlib.RingTheory.RootsOfUnity.EnoughRootsOfUnity
Expand All @@ -4304,6 +4315,7 @@ import Mathlib.RingTheory.RootsOfUnity.PrimitiveRoots
import Mathlib.RingTheory.SimpleModule
import Mathlib.RingTheory.SimpleRing.Basic
import Mathlib.RingTheory.SimpleRing.Defs
import Mathlib.RingTheory.SimpleRing.Matrix
import Mathlib.RingTheory.Smooth.Basic
import Mathlib.RingTheory.Smooth.Kaehler
import Mathlib.RingTheory.Smooth.Pi
Expand Down Expand Up @@ -4763,6 +4775,7 @@ import Mathlib.Topology.Algebra.Valued.NormedValued
import Mathlib.Topology.Algebra.Valued.ValuationTopology
import Mathlib.Topology.Algebra.Valued.ValuedField
import Mathlib.Topology.Algebra.WithZeroTopology
import Mathlib.Topology.ApproximateUnit
import Mathlib.Topology.Baire.BaireMeasurable
import Mathlib.Topology.Baire.CompleteMetrizable
import Mathlib.Topology.Baire.Lemmas
Expand Down Expand Up @@ -5053,14 +5066,14 @@ import Mathlib.Topology.Sets.Closeds
import Mathlib.Topology.Sets.Compacts
import Mathlib.Topology.Sets.Opens
import Mathlib.Topology.Sets.Order
import Mathlib.Topology.Sheaves.CommRingCat
import Mathlib.Topology.Sheaves.Forget
import Mathlib.Topology.Sheaves.Functors
import Mathlib.Topology.Sheaves.Init
import Mathlib.Topology.Sheaves.Limits
import Mathlib.Topology.Sheaves.LocalPredicate
import Mathlib.Topology.Sheaves.LocallySurjective
import Mathlib.Topology.Sheaves.MayerVietoris
import Mathlib.Topology.Sheaves.Operations
import Mathlib.Topology.Sheaves.PUnit
import Mathlib.Topology.Sheaves.Presheaf
import Mathlib.Topology.Sheaves.PresheafOfFunctions
Expand Down
6 changes: 0 additions & 6 deletions Mathlib/Algebra/Algebra/NonUnitalHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,6 @@ theorem coe_mk (f : A → B) (h₁ h₂ h₃ h₄) : ⇑(⟨⟨⟨f, h₁⟩, h
theorem mk_coe (f : A →ₛₙₐ[φ] B) (h₁ h₂ h₃ h₄) : (⟨⟨⟨f, h₁⟩, h₂, h₃⟩, h₄⟩ : A →ₛₙₐ[φ] B) = f := by
rfl

instance : CoeOut (A →ₛₙₐ[φ] B) (A →ₑ+[φ] B) :=
⟨toDistribMulActionHom⟩

instance : CoeOut (A →ₛₙₐ[φ] B) (A →ₙ* B) :=
⟨toMulHom⟩

@[simp]
theorem toDistribMulActionHom_eq_coe (f : A →ₛₙₐ[φ] B) : f.toDistribMulActionHom = ↑f :=
rfl
Expand Down
Loading

0 comments on commit 795b086

Please sign in to comment.