Metatheory.jl icon indicating copy to clipboard operation
Metatheory.jl copied to clipboard

@slots x::T

Open jariji opened this issue 2 years ago • 3 comments

I can say

@slots x @rule log(exp(x::Real)) --> x

but I wonder if the constraint should go with the slot declaration

@slots x::Real @rule log(exp(x)) --> x

This would be easier to read.

jariji avatar Mar 28 '23 23:03 jariji

cool idea!

0x0f0f0f avatar Mar 30 '23 13:03 0x0f0f0f

This too would be much easier to read with just @theory p::Bool q::Bool begin instead of having to rewrite ::Bool at each location.

@theory p q begin
  (p::Bool == q::Bool) => (p == q)
  (p::Bool || q::Bool) => (p || q)
  (p::Bool ⟹ q::Bool)  => ((p || q) == q)
  (p::Bool && q::Bool) => (p && q)
  !(p::Bool)           => (!p)
end

jariji avatar Feb 21 '24 22:02 jariji

Adding it to the list for 3.0

0x0f0f0f avatar Feb 22 '24 11:02 0x0f0f0f