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

Add namespaces to rules #3

Open
EasyArray opened this issue Feb 8, 2022 · 1 comment
Open

Add namespaces to rules #3

EasyArray opened this issue Feb 8, 2022 · 1 comment

Comments

@EasyArray
Copy link
Owner

  • Would be nice to be able to have two or three semantic or formal systems in memory at once
  • Maybe set one as default so you don't need to specify each time
@EasyArray
Copy link
Owner Author

Could solve this problem by defined rules inside a function, then calling the function to switch over to a different set of rules:

def load():
    Rule.deregister()

    rule TN  ⟦α⟧         = lex[α]  || α ∈ lex
    rule NN  ⟦tree[β]⟧   = ⟦β⟧
    rule FAR ⟦tree[γ β]⟧ = ⟦β⟧(⟦γ⟧) || isfun(⟦β⟧) and (⟦γ⟧∈dom(⟦β⟧))
    rule FAL ⟦tree[β γ]⟧ = ⟦β⟧(⟦γ⟧) || isfun(⟦β⟧) and (⟦γ⟧∈dom(⟦β⟧))
    rule PM  ⟦tree[β γ]⟧ = [λx . ⟦β⟧(x) ∧ ⟦γ⟧(x)] || τ(⟦γ⟧)==τ(⟦β⟧)==⟨e,t⟩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant