-
Notifications
You must be signed in to change notification settings - Fork 297
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
Conversation
/-- 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 := |
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.
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
.
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.
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.
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.
I also think that means I'll require that the witnessing model be nonempty.
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.
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/basic.lean
Outdated
@@ -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. -/ |
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.
Please describe the statement first, then explain why this can't be an instance.
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.
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.
bors merge |
…ntic equivalence of formulas (#11928) Defines satisfiability of theories Provides a default model of a satisfiable theory Defines semantic (logical) equivalence of formulas
Pull request successfully merged into master. Build succeeded: |
Defines satisfiability of theories
Provides a default model of a satisfiable theory
Defines semantic (logical) equivalence of formulas