Setup scaffolding for Fraleigh's "A First Course in Abstract Algebra".

finite-set-exercises
Joshua Potter 2023-04-01 20:59:12 -06:00
parent aa59363e74
commit 62077460b5
16 changed files with 145 additions and 64 deletions

View File

@ -1 +1,14 @@
# bookshelf-lean
A collection of proofs and answers to exercises to books I'm studying.
## Updates
Lean's tooling is a fickle beast. If looking to update e.g. `Mathlib`, pin a new
version to the `lake-manifest.json` file and start a new build from scratch:
```bash
> lake update
> lake clean
> lake build
```

View File

@ -5,7 +5,6 @@
Harcourt/Academic Press, 2001.
-/
import Mathlib.Tactic.NormCast
import Mathlib.Tactic.Ring
/--

View File

@ -4,24 +4,24 @@
[{"git":
{"url": "https://github.com/leanprover-community/mathlib4.git",
"subDir?": null,
"rev": "7e974fd3806866272e9f6d9e44fa04c210a21f87",
"rev": "0107c50abf149a48b5b9ad08a0b2a2093bcb567a",
"name": "mathlib",
"inputRev?": null}},
"inputRev?": "0107c50abf149a48b5b9ad08a0b2a2093bcb567a"}},
{"git":
{"url": "https://github.com/gebner/quote4",
"subDir?": null,
"rev": "7ac99aa3fac487bec1d5860e751b99c7418298cf",
"rev": "7ae096b232087096ff0243a2b70d32720d2621ae",
"name": "Qq",
"inputRev?": "master"}},
{"git":
{"url": "https://github.com/JLimperg/aesop",
"subDir?": null,
"rev": "ba61f7fec6174d8c7d2796457da5a8d0b0da44c6",
"rev": "071464ac36e339afb7a87640aa1f8121f707a59a",
"name": "aesop",
"inputRev?": "master"}},
{"git":
{"url": "https://github.com/leanprover/std4",
"subDir?": null,
"rev": "de7e2a79905a3f87cad1ad5bf57045206f9738c7",
"rev": "5507f9d8409f93b984ce04eccf4914d534e6fca2",
"name": "std",
"inputRev?": "main"}}]}

View File

@ -1,11 +1,12 @@
import Lake
open Lake DSL
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git"
package «Bookshelf»
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git" @
"0107c50abf149a48b5b9ad08a0b2a2093bcb567a"
@[default_target]
lean_lib «Bookshelf» {
-- add library configuration options here

View File

@ -1 +1 @@
leanprover/lean4:nightly-2023-02-10
leanprover/lean4:nightly-2023-04-02

View File

@ -0,0 +1,6 @@
/-
# References
1. Fraleigh, John B. A First Course in Abstract Algebra, n.d.
-/
import FirstCourseAbstractAlgebra.Exercises1

View File

@ -0,0 +1,18 @@
/-
# References
1. Fraleigh, John B. A First Course in Abstract Algebra, n.d.
-/
import Mathlib.Data.Complex.Basic
open Complex
open HPow
-- In Exercises 1 through 9 compute the given arithmetic expression and give the
-- answer in the form $a + bi$ for $a, b ∈ $.
theorem ex1_1 : I^3 = 0 + (-1) * I := calc
I^3
= I * (I * hPow I 1) := rfl
_ = 0 + (-1) * I := by simp

View File

@ -0,0 +1,28 @@
{"version": 4,
"packagesDir": "lake-packages",
"packages":
[{"path": {"name": "Bookshelf", "dir": "./../bookshelf"}},
{"git":
{"url": "https://github.com/leanprover-community/mathlib4.git",
"subDir?": null,
"rev": "0107c50abf149a48b5b9ad08a0b2a2093bcb567a",
"name": "mathlib",
"inputRev?": "0107c50abf149a48b5b9ad08a0b2a2093bcb567a"}},
{"git":
{"url": "https://github.com/gebner/quote4",
"subDir?": null,
"rev": "7ae096b232087096ff0243a2b70d32720d2621ae",
"name": "Qq",
"inputRev?": "master"}},
{"git":
{"url": "https://github.com/JLimperg/aesop",
"subDir?": null,
"rev": "071464ac36e339afb7a87640aa1f8121f707a59a",
"name": "aesop",
"inputRev?": "master"}},
{"git":
{"url": "https://github.com/leanprover/std4",
"subDir?": null,
"rev": "5507f9d8409f93b984ce04eccf4914d534e6fca2",
"name": "std",
"inputRev?": "main"}}]}

View File

@ -0,0 +1,14 @@
import Lake
open Lake DSL
package «first-course-abstract-algebra»
require Bookshelf from "../bookshelf"
require mathlib from git
"https://github.com/leanprover-community/mathlib4.git" @
"0107c50abf149a48b5b9ad08a0b2a2093bcb567a"
@[default_target]
lean_lib «FirstCourseAbstractAlgebra» {
-- add library configuration options here
}

View File

@ -0,0 +1 @@
leanprover/lean4:nightly-2023-04-02

View File

@ -7,7 +7,7 @@
"subDir?": null,
"rev": "7e974fd3806866272e9f6d9e44fa04c210a21f87",
"name": "mathlib",
"inputRev?": null}},
"inputRev?": "7e974fd3806866272e9f6d9e44fa04c210a21f87"}},
{"git":
{"url": "https://github.com/gebner/quote4",
"subDir?": null,

View File

@ -1 +1 @@
leanprover/lean4:nightly-2023-02-12
leanprover/lean4:nightly-2023-04-02

View File

@ -45,7 +45,8 @@ Nat.recOn (motive := fun x => Nat.zero + x = x)
(fun (n : Nat) (ih : Nat.zero + n = n) =>
show Nat.zero + n.succ = n.succ from
calc
Nat.zero + n.succ = (Nat.zero + n).succ := add_succ Nat.zero n
Nat.zero + n.succ
= (Nat.zero + n).succ := add_succ Nat.zero n
_ = n.succ := by rw [ih])
-- Additional definitions.

View File

@ -1 +1 @@
leanprover/lean4:nightly-2023-02-10
leanprover/lean4:nightly-2023-04-02