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
4f56a281
Commit
4f56a281
authored
4 years ago
by
hondet
Browse files
Options
Downloads
Patches
Plain Diff
neq and fix
parent
34be791c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
encodings/bool_hol.lp
+4
-1
4 additions, 1 deletion
encodings/bool_hol.lp
paper/proof_irr.lp
+5
-15
5 additions, 15 deletions
paper/proof_irr.lp
with
9 additions
and
16 deletions
encodings/bool_hol.lp
+
4
−
1
View file @
4f56a281
...
@@ -30,6 +30,8 @@ definition iff P Q ≔ (P ⊃ (λ_, Q)) ∧ ((λ_, Q ⊃ (λ_, P)))
...
@@ -30,6 +30,8 @@ definition iff P Q ≔ (P ⊃ (λ_, Q)) ∧ ((λ_, Q ⊃ (λ_, P)))
symbol eq {s: Set}: El s → El s → El bool
symbol eq {s: Set}: El s → El s → El bool
set infix 2 "=" ≔ eq
set infix 2 "=" ≔ eq
set builtin "eq" ≔ eq
set builtin "eq" ≔ eq
definition neq {s: Set} (x y: El s) ≔ ¬ (x = y)
set infix 2 "≠" ≔ neq
// Leibniz equality
// Leibniz equality
rule Prf ($x = $y) ↪ Πp: El (_ ~> bool), Prf (p $x) → Prf (p $y)
rule Prf ($x = $y) ↪ Πp: El (_ ~> bool), Prf (p $x) → Prf (p $y)
...
@@ -42,7 +44,8 @@ proof
...
@@ -42,7 +44,8 @@ proof
qed
qed
set builtin "refl" ≔ eq_refl
set builtin "refl" ≔ eq_refl
theorem eq_trans {a: Set} (x y z: El a) (_: Prf (x = y)) (_: Prf (y = z)): Prf (x = z)
theorem eq_trans {a: Set} (x y z: El a) (_: Prf (x = y)) (_: Prf (y = z))
: Prf (x = z)
proof
proof
assume a x y z hxy hyz p px
assume a x y z hxy hyz p px
refine hyz p (hxy p px)
refine hyz p (hxy p px)
...
...
This diff is collapsed.
Click to expand it.
paper/proof_irr.lp
+
5
−
15
View file @
4f56a281
...
@@ -31,18 +31,15 @@ proof
...
@@ -31,18 +31,15 @@ proof
refine eq_refl l₁
refine eq_refl l₁
qed
qed
constant symbol even_p: El ℕ → Bool
definition even ≔ psub even_p
// Proof irrelevance without K
// Proof irrelevance without K
// We need the following axiom for pairs
definition eqEven (e1 e2: El even) ≔ fst e1 = fst e2
symbol app_pair {a b: Set} (x y: El a) (p: El a → Bool)
(hx: Prf (p x)) (hy: Prf (p y)) (_: Prf (x = y))
: Prf (@pair _ p x hx = @pair _ p y hy)
symbol plus: El ℕ → El ℕ → El ℕ
symbol plus: El ℕ → El ℕ → El ℕ
set infix left 10 "+" ≔ plus
set infix left 10 "+" ≔ plus
symbol even_p: El ℕ → Bool
definition even ≔ psub even_p
symbol plus_closed_even (n m: El even): Prf (even_p ((fst n) + (fst m)))
symbol plus_closed_even (n m: El even): Prf (even_p ((fst n) + (fst m)))
definition add (n m: El even) : El even
definition add (n m: El even) : El even
...
@@ -50,15 +47,8 @@ definition add (n m: El even) : El even
...
@@ -50,15 +47,8 @@ definition add (n m: El even) : El even
symbol plus_commutativity (n m: El ℕ): Prf (n + m = m + n)
symbol plus_commutativity (n m: El ℕ): Prf (n + m = m + n)
theorem even_add_commutativity (n m: El even): Prf (add n m
=
add m n)
theorem even_add_commutativity (n m: El even): Prf
(eqEven
(add n m
) (
add m n)
)
proof
proof
assume n m
assume n m
refine app_pair (fst n + fst m) (fst m + fst n) even_p _ _ _
refine ℕ
// fst n + fst m is even
refine plus_closed_even n m
// fst m + fst n is even
refine plus_closed_even m n
// fst n + m = fst m + n
refine plus_commutativity (fst n) (fst m)
refine plus_commutativity (fst n) (fst m)
qed
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