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

[Merged by Bors] - feat(model_theory/terms_and_formulas): Define satisfiability and semantic equivalence of formulas #11928

Closed
wants to merge 10 commits into from

Conversation

awainverse
Copy link
Collaborator

Defines satisfiability of theories
Provides a default model of a satisfiable theory
Defines semantic (logical) equivalence of formulas


Open in Gitpod

@awainverse awainverse added the awaiting-review The author would like community review of the PR label Feb 8, 2022
src/model_theory/basic.lean Outdated Show resolved Hide resolved
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Feb 10, 2022
@awainverse awainverse added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Feb 10, 2022
src/model_theory/basic.lean Outdated Show resolved Hide resolved
src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
/-- Two (bounded) formulas are semantically equivalent over a theory `T` when they have the same
interpretation in every model of `T`. (This is also known as logical equivalence, which also has a
proof-theoretic definition.) -/
def semantically_equivalent (T : L.Theory) (φ ψ : L.bounded_formula α n) : Prop :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want the predicate "φ and ψ are semantically equivalent in M"?
That might be more convenient, especially since that doesn't require a universe restriction on M.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been studying flypitch more, and I'm now thinking that the right move for this is to define what it means for a theory to model a sentence, and then have this be defined as a theory modelling the implication. Thus I think I might remove semantic equivalence from this PR and revisit it shortly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think that means I'll require that the witnessing model be nonempty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done something like I suggested above. I could easily add some more basic API, but this probably is enough for this PR.

src/model_theory/terms_and_formulas.lean Outdated Show resolved Hide resolved
@fpvandoorn fpvandoorn added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Feb 11, 2022
@awainverse awainverse added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Feb 12, 2022
@@ -130,6 +133,11 @@ instance : has_coe_t L.const M :=
lemma fun_map_eq_coe_const {c : L.const} {x : fin 0 → M} :
fun_map c x = c := congr rfl (funext fin.elim0)

/-- This throws errors as an instance, but could be useful for showing that a particular class of
structures must be nonempty. -/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe the statement first, then explain why this can't be an instance.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done my best to diagnose it. I believe the problem is that the assumptions depend on L but the conclusions do not. It however may still be useful later for a particular language.

@fpvandoorn
Copy link
Member

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Feb 16, 2022
bors bot pushed a commit that referenced this pull request Feb 16, 2022
…ntic equivalence of formulas (#11928)

Defines satisfiability of theories
Provides a default model of a satisfiable theory
Defines semantic (logical) equivalence of formulas
@bors
Copy link

bors bot commented Feb 16, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(model_theory/terms_and_formulas): Define satisfiability and semantic equivalence of formulas [Merged by Bors] - feat(model_theory/terms_and_formulas): Define satisfiability and semantic equivalence of formulas Feb 16, 2022
@bors bors bot closed this Feb 16, 2022
@bors bors bot deleted the satisfiability branch February 16, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants