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
eacec5e5
Commit
eacec5e5
authored
4 years ago
by
gabrielhdt
Browse files
Options
Downloads
Patches
Plain Diff
slightly better
parent
613a6e72
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
paper/rat.lp
+13
-7
13 additions, 7 deletions
paper/rat.lp
with
13 additions
and
7 deletions
paper/rat.lp
+
13
−
7
View file @
eacec5e5
...
...
@@ -15,13 +15,19 @@ constant symbol ℚ+: Set
set builtin "0" ≔ Z
set builtin "+1" ≔ S
symbol plus_nat: η (ℕ ~> ℕ ~> ℕ)
set infix left 4 "+" ≔ plus_nat
symbol times_nat: η (ℕ ~> ℕ ~> ℕ)
set infix left 5 "*" ≔ times_nat
// Some properties of product
rule Z + &n → &n
and &m + S &n → S (&m + &n)
and &n + Z → &n
and S &m + &n → S (&m + &n)
rule Z * _ → Z
and &m * (S &n) → &m + (&m * &n)
and _ * Z → Z
and (S Z) * &n → &n
and &n * (S Z) → &n
and (S &m) * &n → &n + (&m * &n)
symbol nat_induction
: ∀P: η ℕ ⇒ Bool, ε (P 0) ⇒ (∀n, ε (P n) ⇒ ε (P (S n))) ⇒ ∀n, ε (P n)
...
...
@@ -29,7 +35,9 @@ symbol nat_induction
symbol ¬: Bool ⇒ Bool
rule ε (¬ &x) → ε &x ⇒ ∀(z: Bool), ε z
symbol eqnat: η (ℕ ~> ℕ ~> bool)
set infix left 7 "=ℕ" ≔ eqnat
set infix left 3 "=ℕ" ≔ eqnat
symbol s_not_z : ∀x: η ℕ, ε (¬ (Z =ℕ (S x)))
theorem times_comm: ε (forall (λa, forall (λb, (a * b) =ℕ (b * a))))
proof
...
...
@@ -38,9 +46,7 @@ admit
definition {|nznat?|} ≔ λx, ¬ (Z =ℕ x)
definition ℕ* ≔ psub {|nznat?|}
symbol one_not_z
: ε (¬ (eqnat Z (S Z)))
definition Onz ≔ pair {ℕ} {{|nznat?|}} (S Z) (one_not_z) // One not zero
definition Onz ≔ pair {ℕ} {{|nznat?|}} (S Z) (s_not_z Z) // One not zero
symbol Snz: η ℕ* ⇒ η ℕ* // Successor not zero
symbol nznat_induction
...
...
@@ -67,7 +73,7 @@ proof
refine nznat_induction
(λy, imp (Z =ℕ (fst Onz * fst y)) false) ?yOnz ?ySnz
simpl
apply
one
_not_z
apply
s
_not_z
Z
// x = S n
simpl
assume n Hn
...
...
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