definition is_NML_def :
"is_NML s ≡
(⋀ A B p q f form.
ptaut form ⟶ form ∈ s ∧
(IMP (BOX (IMP p q)) (IMP (BOX p) (BOX q))) ∈ s ∧
(IMP (DIAM p) (NOT (BOX (NOT p)))) ∈ s ∧
(IMP (NOT (BOX (NOT p))) (DIAM p)) ∈ s ∧
(A ∈ s ⟶ (subst f A) ∈ s) ∧
(A ∈ s ⟶ (BOX A) ∈ s) ∧
((IMP A B) ∈ s ∧ A ∈ s ⟶ B ∈ s))"
definition NMLG_def:
"NMLG Γ ≡ ⋂ {A | is_NML A ∧ Γ subset A}"
definition NMLG_def is not accepted, with the following error message:
image.png
It infers the type of A to be bool. Why it is doing that and how can I avoid it?
I checked subset predicate takes two sets.
And is_NML takes a term of type form => set.
None of the things are writing type in a meaningful way
is_NML A ∧ Γ subset A
is not a bool{A | P (is_NML A)}
is not a _ set set
as required by ⋂
Γ subset A
does not mean what you think it does and Γ
does not appear anywhere elseSo I suggest looking at other examples (find_theorems "‹{_| _. _}› "
and ‹{_. _}›
) to see how it is supposed to be used
P (is_NML A)
seems to make the wrong sense. is_NML A
should be of type bool
. Here it should be P A
.
I put P because all the stuff after | does not make sense and I have no clue what you intended to write
Mathias Fleury said:
So I suggest looking at other examples (
find_theorems "‹{_| _. _}› "
and‹{_. _}›
) to see how it is supposed to be used
Let me try and see, maybe I should use schematic variables somewhere.
I intend to write a set comprehension to define "NMLG Gamma" to be "the modal logic generated by Gamma". So both Gamma and "NMLG Gamma" should be of type "form set".
I think I understand the following error message: It complains is_NML s is a prop, not bool.
This is because I wrote meta-equality for defining it. Maybe it is not a good idea if I want to use it in a comprehension later... Let me try to edit it into HOL equality...
No isabelle has infered types, concluded that A must be of type bool and then complains that A cannot be an argument of is_NML
Sometimes (like here) the types are so completely messed up, that the error message is not helping you at all
Oh I forgot the screenshot.
Okay then you are right.
Remark that \Gamma appears only in the condition (and is not a set)
Ah? Why Gamma is not a set? It is a form set.
Yiming Xu said:
Ah? Why Gamma is not a set? It should be a form set.
And okay it is indeed because it does not like the prop. Now it works.
image.png
Mathias Fleury said:
Remark that \Gamma appears only in the condition (and is not a set)
So you mean \Gamma does not appear on the RHS of the definition? Maybe that is correct, because I just found that my definition of NMLG is wrong.
image.png
I would like it to be form set => form set! Maybe it is because it does not think the Gamma on the LHS and RHS are the same. HOL4 has the same problem, and can be resolved by adding some bars in the comprehension.
Any clue on how should I deal with that?
Oh maybe I know. The definition of subset.
Fixed. My stupid.
Last updated: Dec 21 2024 at 16:20 UTC