Skip to content

Commit

Permalink
Merge branch 'main' into Surname-Giacomo
Browse files Browse the repository at this point in the history
  • Loading branch information
mo271 authored Nov 20, 2024
2 parents 62ddce0 + fccdbb3 commit dd795e7
Show file tree
Hide file tree
Showing 51 changed files with 128 additions and 698 deletions.
12 changes: 0 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code Reviews

All submissions, including submissions by project members, require review. We
Expand Down
1 change: 0 additions & 1 deletion FormalBook.lean
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import FormalBook.Mathlib.EdgeFinset
import FormalBook.Mathlib.WeightedDoubleCounting

import FormalBook.Chapter_01
import FormalBook.Chapter_02
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_01.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching, Ralf Stephan
-/
import Mathlib.NumberTheory.LucasLehmer
Expand Down
22 changes: 5 additions & 17 deletions FormalBook/Chapter_02.lean
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Algebra.Lie.OfAssociative
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.Convex.SpecificFunctions.Deriv
import Mathlib.Data.Nat.Choose.Factorization
import Mathlib.Data.Real.StarOrdered
import Mathlib.NumberTheory.Harmonic.Defs
import Mathlib.NumberTheory.Primorial
import Mathlib.Tactic.NormNum.Prime
import Mathlib.NumberTheory.Harmonic.Defs
import Mathlib
/-!
# Bertrand's postulate
Expand Down Expand Up @@ -128,7 +116,7 @@ theorem centralBinom_factorization_small (n : ℕ) (n_large : 2 < n)
· exact Finset.range_subset.2 (add_le_add_right (Nat.div_le_self _ _) _)
intro x hx h2x
rw [Finset.mem_range, Nat.lt_succ_iff] at hx h2x
rw [not_le, div_lt_iff_lt_mul' three_pos, mul_comm x] at h2x
rw [not_le, div_lt_iff_lt_mul three_pos, mul_comm x] at h2x
replace no_prime := not_exists.mp no_prime x
rw [← and_assoc, not_and', not_and_or, not_lt] at no_prime
cases' no_prime hx with h h
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_03.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching, Christopher Schmidt
-/
import Mathlib.Analysis.Normed.Field.Lemmas
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_04.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_05.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching, Nikolas Kuhn
-/
import Mathlib.Algebra.Polynomial.Basic
Expand Down
24 changes: 6 additions & 18 deletions FormalBook/Chapter_06.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching, Nick Kuhn
-/
import Mathlib.RingTheory.Henselian
Expand Down Expand Up @@ -114,12 +102,12 @@ lemma div_of_qpoly_div (k n q : ℕ) (hq : 1 < q) (hk : 0 < k) (hn : 0 < n)
calc
_ < q := hq
_ = q^1 := (Nat.pow_one q).symm
_ ≤ q ^ m := (pow_le_pow_iff_right hq).mpr hm
_ ≤ q ^ m := (pow_le_pow_iff_right hq).mpr hm
exact Nat.sub_pos_of_lt this
have : q ^ k - 1 ≤ q ^ m - 1 := Nat.le_of_dvd this H
have : q ^ k ≤ q ^ m := by
simpa [Nat.sub_add_cancel <| one_le_pow m q hq'] using (this)
exact (pow_le_pow_iff_right hq).mp (this)
exact (pow_le_pow_iff_right hq).mp (this)

have : q ^ m - 1 = q^(m - k)*(q ^ k - 1) + (q^(m - k) - 1) := by
zify
Expand Down Expand Up @@ -223,13 +211,13 @@ theorem wedderburn (h: Fintype R): IsField R := by
--(Set.centralizer ({(Quotient.out' (A : ConjClasses Rˣ))} : Set Rˣ))

have h_R: Fintype.card Rˣ = q ^ n - 1 := by
have : Fintype.card Rˣ + 1 = Fintype.card R := Fintype.card_eq_card_units_add_one.symm
have : Fintype.card Rˣ + 1 = Fintype.card R := (Fintype.card_eq_card_units_add_one R).symm
rw [← h_card, ← this]
simp only [ge_iff_le, add_le_iff_nonpos_left, nonpos_iff_eq_zero, Fintype.card_ne_zero,
add_tsub_cancel_right]

have h_Z : Fintype.card Zˣ = q - 1 := by
have h : Fintype.card Zˣ + 1 = Fintype.card Z := Fintype.card_eq_card_units_add_one.symm
have h : Fintype.card Zˣ + 1 = Fintype.card Z := (Fintype.card_eq_card_units_add_one _).symm
have : Fintype.card Z = q := rfl
rw [← this, ← h]
simp only [center_toSubsemiring, Subsemiring.center_toSubmonoid, ge_iff_le,
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_07.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_08.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_09.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_10.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
18 changes: 2 additions & 16 deletions FormalBook/Chapter_11.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand All @@ -33,5 +21,3 @@ import Mathlib.Tactic
- proof
Appendix: Basic graph concepts
-/


16 changes: 2 additions & 14 deletions FormalBook/Chapter_12.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_13.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_14.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
16 changes: 2 additions & 14 deletions FormalBook/Chapter_15.lean
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
/-
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2022 Moritz Firsching. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Moritz Firsching
-/
import Mathlib.Tactic
Expand Down
Loading

0 comments on commit dd795e7

Please sign in to comment.