-
-
Notifications
You must be signed in to change notification settings - Fork 12
add(Incompleteness): Add Jeroslow's Sentence and Formalized Law of Noncontradiction #700
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
Draft
SnO2WMaN
wants to merge
6
commits into
master
Choose a base branch
from
SnO2WMaN/issue698
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1f873eb
wip
SnO2WMaN 24c2e48
Merge branch 'master' into SnO2WMaN/issue698
SnO2WMaN 13fc23b
Refutability Abstraction
SnO2WMaN cbab850
`ℜ` to `𝔚`
SnO2WMaN 9580bec
wip
SnO2WMaN 064c996
Merge remote-tracking branch 'origin/master' into SnO2WMaN/issue698
SnO2WMaN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
167 changes: 167 additions & 0 deletions
167
Foundation/FirstOrder/Bootstrapping/ProvabilityAbstraction/Refutability.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,167 @@ | ||
| import Foundation.FirstOrder.Bootstrapping.RosserProvability | ||
|
|
||
| namespace LO.FirstOrder | ||
|
|
||
| namespace Derivation | ||
|
|
||
| variable {𝓢 : SyntacticFormulas L} {φ : SyntacticSemiformula L 1} | ||
|
|
||
| def specialize'! (t : SyntacticTerm L) (b : 𝓢 ⊢! ∀' φ) : 𝓢 ⊢! φ/[t] := by simpa using specialize (Γ := []) t b; | ||
|
|
||
| def specialize' (t : SyntacticTerm L) (b : 𝓢 ⊢ ∀' φ) : 𝓢 ⊢ φ/[t] := ⟨specialize'! t b.get⟩ | ||
|
|
||
| end Derivation | ||
|
|
||
|
|
||
| namespace Theory | ||
|
|
||
| variable {T : Theory L} {φ : Semisentence L 1} | ||
|
|
||
| def specialize! (t) (b : T ⊢! ∀' φ) : T ⊢! (φ/[t]) := by | ||
| apply ofSyntacticProof; | ||
| sorry; | ||
|
|
||
| def specialize (t) (b : T ⊢ ∀' φ) : T ⊢ (φ/[t]) := by | ||
| have := Derivation.specialize' t $ provable_def.mp b; | ||
| apply provable_def.mpr; | ||
| sorry; | ||
|
|
||
| end Theory | ||
|
|
||
|
|
||
| namespace ProvabilityAbstraction | ||
|
|
||
| open LO.Entailment FirstOrder Diagonalization Provability | ||
|
|
||
| variable {L₀ L : Language} | ||
|
|
||
| structure Refutability [L.ReferenceableBy L₀] (T₀ : Theory L₀) (T : Theory L) where | ||
| refu : Semisentence L₀ 1 | ||
| refu_def {σ : Sentence L} : T ⊢ ∼σ → T₀ ⊢ refu/[⌜σ⌝] | ||
|
|
||
| namespace Refutability | ||
|
|
||
| variable [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} | ||
|
|
||
| @[coe] def rf (𝔚 : Refutability T₀ T) (σ : Sentence L) : Sentence L₀ := 𝔚.refu/[⌜σ⌝] | ||
| instance : CoeFun (Refutability T₀ T) (fun _ ↦ Sentence L → Sentence L₀) := ⟨rf⟩ | ||
|
|
||
| end Refutability | ||
|
|
||
|
|
||
| section | ||
|
|
||
| variable | ||
| {L₀ L : Language} [L.ReferenceableBy L₀] | ||
| {T₀ : Theory L₀} {T : Theory L} | ||
|
|
||
| lemma R1 {𝔚 : Refutability T₀ T} {σ : Sentence L} : T ⊢ ∼σ → T₀ ⊢ 𝔚 σ := fun h ↦ 𝔚.refu_def h | ||
|
|
||
| lemma R1' {L : Language} [L.ReferenceableBy L] {T₀ T : Theory L} | ||
| {𝔚 : Refutability T₀ T} {σ : Sentence L} [T₀ ⪯ T] : T ⊢ ∼σ → T ⊢ 𝔚 σ := fun h ↦ | ||
| WeakerThan.pbl $ R1 h | ||
|
|
||
| end | ||
|
|
||
|
|
||
| section | ||
|
|
||
| variable | ||
| [L.ReferenceableBy L] {T₀ T : Theory L} | ||
| [Diagonalization T₀] | ||
| {𝔚 : Refutability T₀ T} | ||
|
|
||
| /-- This sentence is refutable. -/ | ||
| def jeroslow (𝔚 : Refutability T₀ T) [Diagonalization T₀] : Sentence L := fixedpoint T₀ 𝔚.refu | ||
|
|
||
| lemma jeroslow_def : T₀ ⊢ jeroslow 𝔚 ⭤ 𝔚 (jeroslow 𝔚) := Diagonalization.diag _ | ||
|
|
||
| lemma jeroslow_def' [T₀ ⪯ T] : T ⊢ jeroslow 𝔚 ⭤ 𝔚 (jeroslow 𝔚) := WeakerThan.pbl $ jeroslow_def | ||
|
|
||
|
|
||
| /-- Abstraction of formalized `𝚺₁`-completeness -/ | ||
| class Provability.FormalizedCompleteOn (𝔅 : Provability T₀ T) (σ : Sentence L) where | ||
| formalized_complete_on : T ⊢ σ ➝ 𝔅 σ | ||
| alias Provability.formalized_complete_on := Provability.FormalizedCompleteOn.formalized_complete_on | ||
|
|
||
| class Provability.SoundOn (𝔅 : Provability T₀ T) (σ : Sentence L) where | ||
| sound_on : T ⊢ 𝔅 σ → T ⊢ σ | ||
| alias Provability.sound_on := Provability.SoundOn.sound_on | ||
|
|
||
| class Refutability.SoundOn (𝔚 : Refutability T₀ T) (σ : Sentence L) where | ||
| sound_on : T ⊢ 𝔚 σ → T ⊢ ∼σ | ||
| alias Refutability.sound_on := Refutability.SoundOn.sound_on | ||
|
|
||
| end | ||
|
|
||
|
|
||
| section | ||
|
|
||
| variable | ||
| [L.ReferenceableBy L] {T₀ T : Theory L} | ||
| [Diagonalization T₀] | ||
| {𝔚 : Refutability T₀ T} | ||
|
|
||
| lemma unprovable_jeroslow [T₀ ⪯ T] [Consistent T] [Refutability.SoundOn 𝔚 (jeroslow 𝔚)] : T ⊬ jeroslow 𝔚 := by | ||
| by_contra hC; | ||
| apply Entailment.Consistent.not_bot (𝓢 := T); | ||
| . infer_instance; | ||
| . have : T ⊢ ∼(jeroslow 𝔚) := Refutability.sound_on $ (Entailment.iff_of_E! $ jeroslow_def') |>.mp hC; | ||
| exact (N!_iff_CO!.mp this) ⨀ hC; | ||
|
|
||
| end | ||
|
|
||
|
|
||
| section | ||
|
|
||
| variable | ||
| [L.ReferenceableBy L] {T₀ T : Theory L} | ||
| [Diagonalization T₀] | ||
| {𝔅 : Provability T₀ T} {𝔚 : Refutability T₀ T} | ||
|
|
||
| /-- Formalized Law of Noncontradiction holds on `x` -/ | ||
| def safe (𝔅 : Provability T₀ T) (𝔚 : Refutability T₀ T) : Semisentence L 1 := “x. ¬(!𝔅.prov x ∧ !𝔚.refu x)” | ||
|
|
||
| /-- Formalized Law of Noncontradiction -/ | ||
| def flon (𝔅 : Provability T₀ T) (𝔚 : Refutability T₀ T) : Sentence L := “∀ x, !(safe 𝔅 𝔚) x” | ||
|
|
||
| end | ||
|
|
||
|
|
||
| section | ||
|
|
||
| variable | ||
| [L.DecidableEq] [L.ReferenceableBy L] {T₀ T : Theory L} | ||
| [Diagonalization T₀] [T₀ ⪯ T] | ||
| {𝔅 : Provability T₀ T} {𝔚 : Refutability T₀ T} | ||
|
|
||
| local notation "𝐉" => jeroslow 𝔚 | ||
|
|
||
| lemma jeroslow_not_safe [𝔅.FormalizedCompleteOn 𝐉] : T ⊢ 𝐉 ➝ (𝔅 𝐉 ⋏ 𝔚 𝐉) := by | ||
| have h₁ : T ⊢ 𝐉 ➝ 𝔅 𝐉 := Provability.formalized_complete_on; | ||
| have h₂ : T ⊢ 𝐉 ⭤ 𝔚 𝐉 := jeroslow_def'; | ||
| cl_prover [h₁, h₂]; | ||
|
|
||
| /-- | ||
| Formalized law of noncontradiction cannot be proved. | ||
| Alternative form of Gödel's second incompleteness theorem. | ||
| -/ | ||
| lemma unprovable_flon [consis : Consistent T] [𝔅.FormalizedCompleteOn 𝐉] : T ⊬ flon 𝔅 𝔚 := by | ||
| contrapose! consis; | ||
| replace consis : T ⊢ ∀' safe 𝔅 𝔚 := by simpa [flon] using consis; | ||
| have h₁ : T ⊢ ∼(𝔅 𝐉 ⋏ 𝔚 𝐉) := by simpa [safe] using FirstOrder.Theory.specialize _ $ consis; | ||
| have h₂ : T ⊢ 𝐉 ➝ 𝔅 𝐉 := Provability.formalized_complete_on; | ||
| have h₃ : T ⊢ 𝐉 ⭤ 𝔚 𝐉 := jeroslow_def'; | ||
| have h₄ : T ⊢ ∼(𝔅 𝐉 ⋏ 𝔚 𝐉) ➝ ∼𝐉 := contra! $ by cl_prover [h₂, h₃]; | ||
| have h₅ : T ⊢ ∼𝐉 := h₄ ⨀ h₁; | ||
| have h₆ : T ⊢ 𝔚 𝐉 := R1' h₅; | ||
| have h₇ : T ⊢ 𝔚 𝐉 ➝ 𝐉 := by cl_prover [h₃]; | ||
| have h₈ : T ⊢ 𝐉 := h₇ ⨀ h₆; | ||
| exact not_consistent_iff_inconsistent.mpr <| inconsistent_iff_provable_bot.mpr $ (N!_iff_CO!.mp h₅) ⨀ h₈; | ||
|
|
||
| end | ||
|
|
||
|
|
||
| end ProvabilityAbstraction | ||
|
|
||
| end LO.FirstOrder | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あっては欲しいのだが.Termの扱いがよくわからず頓挫している.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確かめていないが LO.FirstOrder.SyntacticFormulas.coe_provable_iff_provable_coe とか LO.FirstOrder.Rewriting.emb_subst_eq_subst_coe₁ とか LO.FirstOrder.Semiformula.coe_subst_eq_subst_coe₁ を使って示せないだろうか.