Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
personoj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
koizel
personoj
Commits
66cfe532
Commit
66cfe532
authored
5 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
a proof on even numbers
parent
46ffc7ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sandbox/nat.lp
+14
-1
14 additions, 1 deletion
sandbox/nat.lp
with
14 additions
and
1 deletion
sandbox/nat.lp
+
14
−
1
View file @
66cfe532
...
@@ -24,7 +24,7 @@ rule (succ &n) * &m → &n * &m + &m
...
@@ -24,7 +24,7 @@ rule (succ &n) * &m → &n * &m + &m
and &n * (succ &m) → &n * &m + &n
and &n * (succ &m) → &n * &m + &n
and _ * 0 → 0
and _ * 0 → 0
symbol prod_comm (x y: Term Nat): Term (
eq (times x y) (times y
x))
symbol prod_comm (x y: Term Nat): Term (
(x * y) = (y *
x))
//
//
...
@@ -45,3 +45,16 @@ symbol one_not_zero: Term (not_zero 1)
...
@@ -45,3 +45,16 @@ symbol one_not_zero: Term (not_zero 1)
symbol induction (P: Term Nat ⇒ Term bool):
symbol induction (P: Term Nat ⇒ Term bool):
∀n, Term (P 0) ⇒ Term (P (n + 1)) ⇒ ∀m, Term (P m)
∀n, Term (P 0) ⇒ Term (P (n + 1)) ⇒ ∀m, Term (P m)
// Divisions
definition div (x y: Term Nat) ≔ ∃ (λk, x * k = y)
definition even (x: Term Nat) ≔ div 2 x
definition Even ≔ Psub even
theorem even_stable_double: ∀x: Term Even, Term (even (2 * (fst x)))
proof
assume x h
refine (h (fst x) _)
simpl
refine reflexivity_of_equal _ ((fst x) + (fst x))
qed
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment