proofsystem.rng 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <grammar xmlns="http://relaxng.org/ns/structure/1.0"
  2. ns="http://relaxng.org/ns/proofsystem">
  3. <start>
  4. <element name="proofSystem">
  5. <oneOrMore>
  6. <element name="rule">
  7. <attribute name="name"/>
  8. <zeroOrMore>
  9. <ref name="antecedent"/>
  10. </zeroOrMore>
  11. <ref name="consequent"/>
  12. </element>
  13. </oneOrMore>
  14. </element>
  15. </start>
  16. <define name="formula">
  17. <element name="formula">
  18. <choice>
  19. <ref name="judgement"/>
  20. <ref name="expr"/>
  21. </choice>
  22. </element>
  23. </define>
  24. <define name="consequent">
  25. <ref name="judgement"/>
  26. </define>
  27. <define name="antecedent">
  28. <ref name="judgement"/>
  29. </define>
  30. <define name="judgement">
  31. <choice>
  32. <element name="judgement">
  33. <attribute name="name"/>
  34. <zeroOrMore>
  35. <ref name="expr"/>
  36. </zeroOrMore>
  37. </element>
  38. <element name="not">
  39. <ref name="judgement"/>
  40. </element>
  41. </choice>
  42. </define>
  43. <define name="expr">
  44. <choice>
  45. <element name="var">
  46. <attribute name="range"/>
  47. <optional>
  48. <attribute name="index"/>
  49. </optional>
  50. <optional>
  51. <attribute name="sub"/>
  52. </optional>
  53. </element>
  54. <element name="function">
  55. <attribute name="name"/>
  56. <zeroOrMore>
  57. <ref name="expr"/>
  58. </zeroOrMore>
  59. </element>
  60. <element name="element">
  61. <attribute name="name"/>
  62. <zeroOrMore>
  63. <element name="attribute">
  64. <attribute name="name"/>
  65. <ref name="expr"/>
  66. </element>
  67. </zeroOrMore>
  68. <optional>
  69. <ref name="context"/>
  70. </optional>
  71. <zeroOrMore>
  72. <ref name="expr"/>
  73. </zeroOrMore>
  74. </element>
  75. <element name="group">
  76. <zeroOrMore>
  77. <ref name="expr"/>
  78. </zeroOrMore>
  79. </element>
  80. <element name="string"><text/></element>
  81. </choice>
  82. </define>
  83. <define name="context">
  84. <element name="context">
  85. <ref name="expr"/>
  86. </element>
  87. </define>
  88. </grammar>