Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intial #13

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
316a15d
intial
AlexSosnkowski Sep 11, 2021
91a0d9d
test
AlexSosnkowski Sep 11, 2021
c88a56a
test testing
AlexSosnkowski Sep 11, 2021
7a4c516
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 13, 2021
2e20424
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 13, 2021
a333be9
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 15, 2021
3c8b80e
quick message
AlexSosnkowski Sep 17, 2021
5ec779b
quick message2
AlexSosnkowski Sep 17, 2021
0a45c52
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 17, 2021
ebf2677
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 17, 2021
7bc08c8
homework completed I believe
AlexSosnkowski Sep 17, 2021
9feccee
homework completed I believe 2
AlexSosnkowski Sep 17, 2021
99ada03
hw 1 and 2
AlexSosnkowski Sep 17, 2021
e23e14e
hw 2 work in progress
AlexSosnkowski Sep 17, 2021
ee188e2
hw 1 submission
AlexSosnkowski Sep 17, 2021
57a25d1
hw 1 submission final
AlexSosnkowski Sep 17, 2021
61d8d42
hw 3 half way done
AlexSosnkowski Sep 20, 2021
028ebbf
more progress
AlexSosnkowski Sep 20, 2021
1d337d6
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 20, 2021
c581ac4
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 21, 2021
45b8f53
hw 3 almost done
AlexSosnkowski Sep 21, 2021
68e3a17
hw 3 completed
AlexSosnkowski Sep 21, 2021
3d703e7
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 22, 2021
ea24a68
help
AlexSosnkowski Sep 22, 2021
2ce3240
hw 3
AlexSosnkowski Sep 23, 2021
2eab266
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 23, 2021
07e563a
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 24, 2021
f4a0e53
message
AlexSosnkowski Sep 27, 2021
1a15bfe
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 27, 2021
8d4fbf9
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 28, 2021
0254e1b
hw 4 in progress
AlexSosnkowski Sep 28, 2021
959ad93
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 28, 2021
e41882a
hw 4 complete
AlexSosnkowski Sep 29, 2021
0e2da03
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Sep 29, 2021
262cc7f
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 1, 2021
2e06da7
hello
AlexSosnkowski Oct 4, 2021
a438b48
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 4, 2021
0b06a6c
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 5, 2021
3320544
exam 1
AlexSosnkowski Oct 8, 2021
049e06b
exam 1
AlexSosnkowski Oct 8, 2021
4a93ea8
exam
AlexSosnkowski Oct 8, 2021
287f942
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 13, 2021
bccf0d1
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 13, 2021
acb10d7
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 15, 2021
a37eac2
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 18, 2021
4191be5
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 20, 2021
969d093
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 22, 2021
f93e1ed
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 22, 2021
bcc8c11
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 25, 2021
c63deb9
hw updates
AlexSosnkowski Oct 27, 2021
e98b00a
hw updates
AlexSosnkowski Oct 27, 2021
ffd175e
hw6
AlexSosnkowski Oct 27, 2021
6775b0a
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 27, 2021
386df18
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 27, 2021
bcd7499
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Oct 29, 2021
a92295c
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 1, 2021
c7f77da
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 3, 2021
c53f357
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 5, 2021
8553db1
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 5, 2021
3072d2d
message
AlexSosnkowski Nov 8, 2021
7141898
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 8, 2021
3049545
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 10, 2021
2e2946f
hw 7
AlexSosnkowski Nov 12, 2021
0367690
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 12, 2021
5dc200b
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 15, 2021
d1f8332
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 17, 2021
d78b04d
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 17, 2021
ce809a5
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 19, 2021
6a27a33
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 20, 2021
075e0b8
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Nov 29, 2021
cc4f9f0
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Dec 1, 2021
5deabc7
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Dec 1, 2021
036f265
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Dec 3, 2021
20c4811
last
AlexSosnkowski Dec 5, 2021
bb6678f
Merge branch 'main' of https://github.com/kevinsullivan/cs2120f21 int…
AlexSosnkowski Dec 5, 2021
8e121ca
final hw
AlexSosnkowski Dec 7, 2021
c22a552
final push
AlexSosnkowski Dec 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [

],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
2 changes: 1 addition & 1 deletion src/instructor/lectures/lecture_22.lean
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ begin
rw int.distrib_right _ _ _, -- LIBRARY LOOKUP!
rw <-h2pf,
rw <-h1pf,
ring,
ring, -- the rest is true by simple algebra
end

/-
Expand Down
2 changes: 1 addition & 1 deletion src/instructor/lectures/lecture_29a.lean
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ begin
-- that follow "usual" rules of arithmetic
ring,
end

--take away the patterns! look for a way to turn your goal into a statement that can be rewritten to solve with your induction hypothesis



Expand Down
28 changes: 26 additions & 2 deletions src/instructor/lectures/lecture_8.lean
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
theorem and_associate :
∀ (P Q R : Prop), (P ∧ Q) ∧ R → P ∧ (Q ∧ R) :=

begin
assume P Q R,
assume h,
have pq : P ∧ Q := and.elim_left h,
have p : P := and.elim_left pq,
have q : Q := and.elim_right pq,
have r : R := and.elim_right h,
exact and.intro p (and.intro q r),
end



/-
<<<<<<< HEAD
apply can have placeholders which become sub goals of the proof
you can replace exact with reply but not always the other way around

top down structured proofs / programing

=======
-/

theorem and_associative :
Expand All @@ -14,6 +36,7 @@ begin
end

/-
>>>>>>> 12a00a0280a66121314f050808b162610d864adc
The or connective, ∨, in predicate logic
join any two propositions, P, Q, into a
larger proposition, P ∨ Q. This proposition
Expand Down Expand Up @@ -77,8 +100,9 @@ axioms (Joe_is_tall Joe_chews_gum : Prop)
axiom jcg: Joe_chews_gum

theorem jcg_or_jit: Joe_chews_gum ∨ Joe_is_tall :=
or.intro_left Joe_is_tall jcg

begin
apply or.intro_left Joe_is_tall jcg,
end
/-
We thus have two inference rules (axioms) that we
can use to create a proof of a "disjunction".
Expand Down
16 changes: 16 additions & 0 deletions src/mywork/10-29.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def cong_mod (n a b : ℤ) : Prop :=
∃ k, a - b = k * n

#reduce cong_mod (4:ℤ)
#reduce cong_mod (4:ℤ) (6:ℤ) (10:ℤ) --evaluates to the proposition


example : cong_mod (4:ℤ) (6:ℤ) (14:ℤ) :=
begin
unfold cong_mod,
apply exists.intro (-2:ℤ) _,
apply eq.refl,
end

--in functional programming, if we have a function that takes three arguments we can consider it a function that takes in one number and returns a function with two inputs and so on
-- this means we are partially evaluating the function by giving it the single number 4.
44 changes: 44 additions & 0 deletions src/mywork/hw will be uploaded soon.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
example: 0 ≠ 1 :=
begin
assume a, --intro rule for negation. This means ¬ (0=1) or (0=1) → false
cases a, --for all possible proofs of 0 = 1 it is empty and therefore implies false
end

example : 0 ≠ 0 → 2 = 3 :=
begin
assume a,
apply false.elim; -- does false.elim know that 2 ≠ 3?
apply a (eq.refl 0), -- you can also use the contradiction tactic. Looks for a proof of false or p and not p
end

example : ∀ (P : Prop), P → ¬ ¬ P :=
begin
assume p b c, --not not p is not p implies false then (p implies false) implies false
--have a : p ∧ ¬p := and.intro b c, -- contradiction
--have f := c b, or do this and apply f.
contradiction, -- there could also be case analysis to show no proofs of false
end

axioms em : ∀ (p : Prop), p ∨ ¬p


theorem neg_elim : ∀ (P : Prop), ¬¬P → P :=
begin
assume p,
assume h,
have ponp := classical.em p,
cases ponp with p pn,
assumption, -- proof is in my list of assumptions
contradiction,
-- we have nothing to apply our function h to
-- we have nothing to work with

end -- this works in classical reasoning but this is not valid in leand constructive logic
-- given the current axioms we can not prove this, we need to define this as an axiom. We can have it and we can not have this as an axiom

-- axioms em : ∀ (p : Prop), p ∨ ¬p only use this if you want classical reasoning
--the hw will need this exclusion of the middle axiom
-- using case analysis comes from a disjunction


-- everything on hw is proovable
Loading