Skip to content
Snippets Groups Projects
Commit 040e9a33 authored by ComFreek's avatar ComFreek
Browse files

System.Object[]

parent 8b4d1167
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#0.0.0:1248.35.0"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#0.0.0:84.0.84"/></metadata>Miscellaneous scrolls for playing around/testing that don't have a good home yet</opaque><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><mref name="[http://mathhub.info/FrameIT/frameworld?Midpoint]" target="http://mathhub.info/FrameIT/frameworld?Midpoint"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#165.5.0:179.5.14"/></metadata></mref></omdoc> <omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#0.0.0:1241.36.0"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#0.0.0:84.0.84"/></metadata>Miscellaneous scrolls for playing around/testing that don't have a good home yet</opaque><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><mref name="[http://mathhub.info/FrameIT/frameworld?Midpoint]" target="http://mathhub.info/FrameIT/frameworld?Midpoint"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/MiscScrolls.mmt#165.5.0:179.5.14"/></metadata></mref></omdoc>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.mmt#0.0.0:1619.45.0"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.mmt#78.3.0:245.11.0"/></metadata><scope>\ <omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.mmt#0.0.0:1612.46.0"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/SupplementaryAngles.mmt#78.3.0:245.11.0"/></metadata><scope>\
\ D \ D
\ \
________\_________ ________\_________
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#0.0.0:4687.132.3"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#0.0.0:47.0.47"/></metadata>Modular scrolls having to do with triangles</opaque><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#128.5.0:322.14.0"/></metadata>A blueprint problem theory for triangle scrolls <omdoc base="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.omdoc"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#0.0.0:4666.135.3"/><meta property="http://cds.omdoc.org/?metadata?importedby"><om:OMOBJ xmlns:om="http://www.openmath.org/OpenMath"><om:OMLIT type="http://www.openmath.org/cd?OpenMath?OMSTR" value="mmt-omdoc"/></om:OMOBJ></meta></metadata><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#0.0.0:47.0.47"/></metadata>Modular scrolls having to do with triangles</opaque><instruction text="namespace http://mathhub.info/FrameIT/frameworld"/><instruction text="fixmeta http://mathhub.info/FrameIT/frameworld?FrameworldMeta"/><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#128.5.0:322.14.0"/></metadata>A blueprint problem theory for triangle scrolls
B B
/| /|
/ | / |
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
(nicer image: https://en.wikipedia.org/wiki/Right_triangle#/media/File:Rtriangle.svg)</opaque><mref name="[http://mathhub.info/FrameIT/frameworld?TriangleScroll_GeneralProblem]" target="http://mathhub.info/FrameIT/frameworld?TriangleScroll_GeneralProblem"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#324.15.0:359.15.35"/></metadata></mref><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#511.21.0:667.23.77"/></metadata>A blueprint problem theory for triangle scrolls that require a right angle (nicer image: https://en.wikipedia.org/wiki/Right_triangle#/media/File:Rtriangle.svg)</opaque><mref name="[http://mathhub.info/FrameIT/frameworld?TriangleScroll_GeneralProblem]" target="http://mathhub.info/FrameIT/frameworld?TriangleScroll_GeneralProblem"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#324.15.0:359.15.35"/></metadata></mref><opaque format="text"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#511.21.0:667.23.77"/></metadata>A blueprint problem theory for triangle scrolls that require a right angle
We use ?TriangleScroll_GeneralProblem and demand the angle at C to be 90°</opaque><mref name="[http://mathhub.info/FrameIT/frameworld?TriangleScroll_RightAngledProblem]" target="http://mathhub.info/FrameIT/frameworld?TriangleScroll_RightAngledProblem"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#669.24.0:708.24.39"/></metadata></mref><mref name="[http://mathhub.info/FrameIT/frameworld?AngleSum]" target="http://mathhub.info/FrameIT/frameworld?AngleSum"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#941.33.0:955.33.14"/></metadata></mref><mref name="[http://mathhub.info/FrameIT/frameworld?OppositeLen]" target="http://mathhub.info/FrameIT/frameworld?OppositeLen"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#2247.67.0:2264.67.17"/></metadata></mref></omdoc> We use ?TriangleScroll_GeneralProblem and demand the angle at C to be 90°</opaque><mref name="[http://mathhub.info/FrameIT/frameworld?TriangleScroll_RightAngledProblem]" target="http://mathhub.info/FrameIT/frameworld?TriangleScroll_RightAngledProblem"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#669.24.0:708.24.39"/></metadata></mref><mref name="[http://mathhub.info/FrameIT/frameworld?AngleSum]" target="http://mathhub.info/FrameIT/frameworld?AngleSum"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#941.33.0:955.33.14"/></metadata></mref><mref name="[http://mathhub.info/FrameIT/frameworld?OppositeLen]" target="http://mathhub.info/FrameIT/frameworld?OppositeLen"><metadata><link rel="http://cds.omdoc.org/mmt?metadata?sourceRef" resource="http://mathhub.info/FrameIT/frameworld/Scrolls/TriangleScrolls.mmt#2240.68.0:2257.68.17"/></metadata></mref></omdoc>
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,9 @@ namespace http://mathhub.info/FrameIT/frameworld ❚ ...@@ -4,6 +4,9 @@ namespace http://mathhub.info/FrameIT/frameworld ❚
fixmeta ?FrameworldMeta ❚ fixmeta ?FrameworldMeta ❚
theory Midpoint = theory Midpoint =
meta ?MetaAnnotations?problemTheory ?Midpoint/Problem ❙
meta ?MetaAnnotations?solutionTheory ?Midpoint/Solution ❙
theory Problem = theory Problem =
P P
: point ❘ : point ❘
...@@ -22,8 +25,6 @@ theory Midpoint = ...@@ -22,8 +25,6 @@ theory Midpoint =
include ?Midpoint/Problem ❙ include ?Midpoint/Problem ❙
meta ?MetaAnnotations?label "MidPoint" ❙ meta ?MetaAnnotations?label "MidPoint" ❙
meta ?MetaAnnotations?problemTheory ?Midpoint/Problem ❙
meta ?MetaAnnotations?solutionTheory ?Midpoint/Solution ❙
meta ?MetaAnnotations?description s"Our MidPoint scroll that given two points ${lverb P} and ${lverb Q} computes the midpoint of the line ${lverb P Q}." ❙ meta ?MetaAnnotations?description s"Our MidPoint scroll that given two points ${lverb P} and ${lverb Q} computes the midpoint of the line ${lverb P Q}." ❙
midpoint midpoint
......
...@@ -3,17 +3,23 @@ ...@@ -3,17 +3,23 @@
## How to write one ## How to write one
Let's walk through an example of writing a scroll. Let's walk through an example of writing a scroll.
The scroll we will be writing can be found in `MiscScrolls.mmt` at time of writing, albeit without the documentary comments we will be making here. The scroll we will be writing can be found in `MiscScrolls.mmt` at time of writing, albeit without the documentary comments we will be supplying here.
Let us write a scroll "Midpoint" that requires two points `P` and `Q` as input, and that gives you upon application the midpoint between those points. Let us write a scroll "Midpoint" that requires two points `P` and `Q` as input, and that gives you upon application the midpoint between those points:
```mmt ```mmt
theory Midpoint = theory Midpoint =
// A scroll is a theory with two special meta datums referencing a problem and a solution theory: ❙
meta ?MetaAnnotations?problemTheory ?Midpoint/Problem ❙
meta ?MetaAnnotations?solutionTheory ?Midpoint/Solution ❙
// You can specify those theories as nested theories of the scroll theory as such, but this is not required at all; it is just convention. ❙
theory Problem = theory Problem =
// Declare all required fact inputs here. // Declare all required fact inputs here.
For every fact, you may (but are not required to) give some meta information For every fact, you may (but are not required to) give some meta information
like a label and description ❙ like a label and description.
P P
: point ❘ : point ❘
...@@ -29,29 +35,25 @@ theory Midpoint = ...@@ -29,29 +35,25 @@ theory Midpoint =
theory Solution = theory Solution =
// note: include the problem theory before spelling out the meta annotations // A solution theory always starts with including the problem theory: ❙
to have access to the facts formalized in the problem theory ❙
include ?Midpoint/Problem ❙ include ?Midpoint/Problem ❙
// the next meta annotations (to the theory) actually make this theory into a scroll: // Next, we can supply a label and a description to be used for the overall scroll:❙
We specify the Problem and Solution theories ❙
meta ?MetaAnnotations?label "MidPoint" ❙ meta ?MetaAnnotations?label "MidPoint" ❙
meta ?MetaAnnotations?problemTheory ?Midpoint/Problem ❙ meta ?MetaAnnotations?description s"Our MidPoint scroll that given two points ${lverb P} and ${lverb Q} computes the midpoint of the line ${lverb P Q}." ❙
meta ?MetaAnnotations?solutionTheory ?Midpoint/Solution ❙
// Here, the description uses MMT's interpolation feature by prefixing the double quotes with an "s".
This allows embedding arbitrary MMT terms within the string via ${...} where ... is an MMT term.
// In the next meta datum string we prefix the double quotes by an "s" In FrameIT, we use such string interpolation to give the scroll a more dynamic flavor:
to be able to make use of string interpolation. Concretely, this makes
the scroll dynamic: if the user fills the first P fact slot by a point
with label A, then the scroll description should also talk about A, not P.
Hence, we use "${lverb P}", where by P we refer to the fact constant of P If the user fills the first P fact slot by a point with label A, then the scroll description should also talk about A, not P.
as included by the problem theory. Read this as "label verbalization of P". For that we can use the MMT term `lverb P` that stands for "label verbalization" of P embedded into the description string via "${lverb P}".
Whenever the user reassigns the fact slot for P, the label verbalization will kick in again and adjust the result of "${lverb P}" to the label of the actually assigned fact.
And "${lverb P Q}" is syntactic sugar for "${lverb P}${lverb Q}", i.e., the mere
concatenation (without whitespace). ❙ And "${lverb P Q}" is syntactic sugar for "${lverb P}${lverb Q}", i.e., the mere concatenation (without whitespace). ❙
meta ?MetaAnnotations?description s"Our MidPoint scroll that given two points ${lverb P} and ${lverb Q} computes the midpoint of the line ${lverb P Q}." ❙
// Next, solution theories declare all facts that are acquired upon successful application: ❙
midpoint midpoint
: point ❘ : point ❘
......
...@@ -11,6 +11,9 @@ A B C ...@@ -11,6 +11,9 @@ A B C
The scroll encodes "angle ABD + angle DBC = 180°", or rather, "angle DBC = 180° - angle ABD" The scroll encodes "angle ABD + angle DBC = 180°", or rather, "angle DBC = 180° - angle ABD"
theory SupplementaryAngles = theory SupplementaryAngles =
meta ?MetaAnnotations?problemTheory ?SupplementaryAngles/Problem ❙
meta ?MetaAnnotations?solutionTheory ?SupplementaryAngles/Solution ❙
theory Problem = theory Problem =
A: point ❘ meta ?MetaAnnotations?label "A" ❙ A: point ❘ meta ?MetaAnnotations?label "A" ❙
B: point ❘ meta ?MetaAnnotations?label "B" ❙ B: point ❘ meta ?MetaAnnotations?label "B" ❙
...@@ -30,8 +33,6 @@ theory SupplementaryAngles = ...@@ -30,8 +33,6 @@ theory SupplementaryAngles =
theory Solution = theory Solution =
meta ?MetaAnnotations?label "AngleSum" ❙ meta ?MetaAnnotations?label "AngleSum" ❙
meta ?MetaAnnotations?problemTheory ?SupplementaryAngles/Problem ❙
meta ?MetaAnnotations?solutionTheory ?SupplementaryAngles/Solution ❙
meta ?MetaAnnotations?description "Supplementary angles add up to 180 degree " ❙ meta ?MetaAnnotations?description "Supplementary angles add up to 180 degree " ❙
include ?SupplementaryAngles/Problem ❙ include ?SupplementaryAngles/Problem ❙
......
...@@ -32,6 +32,9 @@ theory TriangleScroll_RightAngledProblem = ...@@ -32,6 +32,9 @@ theory TriangleScroll_RightAngledProblem =
theory AngleSum = theory AngleSum =
meta ?MetaAnnotations?problemTheory ?AngleSum/Problem ❙
meta ?MetaAnnotations?solutionTheory ?AngleSum/Solution ❙
theory Problem = theory Problem =
include ?TriangleScroll_GeneralProblem ❙ include ?TriangleScroll_GeneralProblem ❙
...@@ -52,8 +55,6 @@ theory AngleSum = ...@@ -52,8 +55,6 @@ theory AngleSum =
include ?AngleSum/Problem ❙ include ?AngleSum/Problem ❙
meta ?MetaAnnotations?label "AngleSum" ❙ meta ?MetaAnnotations?label "AngleSum" ❙
meta ?MetaAnnotations?problemTheory ?AngleSum/Problem ❙
meta ?MetaAnnotations?solutionTheory ?AngleSum/Solution ❙
meta ?MetaAnnotations?description s"Given a triangle ${lverb A B C} and two known angles, we can deduce the missing angle by the sum of interior angles in triangles always being 180°" ❙ meta ?MetaAnnotations?description s"Given a triangle ${lverb A B C} and two known angles, we can deduce the missing angle by the sum of interior angles in triangles always being 180°" ❙
angleBCA angleBCA
...@@ -66,6 +67,9 @@ theory AngleSum = ...@@ -66,6 +67,9 @@ theory AngleSum =
theory OppositeLen = theory OppositeLen =
meta ?MetaAnnotations?problemTheory ?OppositeLen/Problem ❙
meta ?MetaAnnotations?solutionTheory ?OppositeLen/Solution ❙
theory Problem = theory Problem =
include ?TriangleScroll_RightAngledProblem ❙ include ?TriangleScroll_RightAngledProblem ❙
...@@ -86,8 +90,6 @@ theory OppositeLen = ...@@ -86,8 +90,6 @@ theory OppositeLen =
include ?OppositeLen/Problem ❙ include ?OppositeLen/Problem ❙
meta ?MetaAnnotations?label "OppositeLen" ❙ meta ?MetaAnnotations?label "OppositeLen" ❙
meta ?MetaAnnotations?problemTheory ?OppositeLen/Problem ❙
meta ?MetaAnnotations?solutionTheory ?OppositeLen/Solution ❙
meta ?MetaAnnotations?description s"Given a triangle ${lverb A B C} right angled at ${lverb C}, the distance ${lverb A B} can be computed from the angle at ${lverb B} and the distance ${lverb B C}" ❙ meta ?MetaAnnotations?description s"Given a triangle ${lverb A B C} right angled at ${lverb C}, the distance ${lverb A B} can be computed from the angle at ${lverb B} and the distance ${lverb B C}" ❙
deducedLineCA deducedLineCA
...@@ -101,6 +103,9 @@ theory OppositeLen = ...@@ -101,6 +103,9 @@ theory OppositeLen =
// Doesn't typecheck, not sure why ❚ // Doesn't typecheck, not sure why ❚
// theory Pythagoras = // theory Pythagoras =
meta ?MetaAnnotations?problemTheory ?Pythagoras/Problem ❙
meta ?MetaAnnotations?solutionTheory ?Pythagoras/Solution ❙
theory Problem = theory Problem =
include ?TriangleScroll_RightAngledProblem ❙ include ?TriangleScroll_RightAngledProblem ❙
...@@ -119,8 +124,6 @@ theory OppositeLen = ...@@ -119,8 +124,6 @@ theory OppositeLen =
include ?Pythagoras/Problem ❙ include ?Pythagoras/Problem ❙
meta ?MetaAnnotations?label "Pythagoras" ❙ meta ?MetaAnnotations?label "Pythagoras" ❙
meta ?MetaAnnotations?problemTheory ?Pythagoras/Problem ❙
meta ?MetaAnnotations?solutionTheory ?Pythagoras/Solution ❙
meta ?MetaAnnotations?description "Given a ABC right-angled at C and lengths of both legs, we can compute the length of the hypotenuse via Pythagora's theorem" ❙ meta ?MetaAnnotations?description "Given a ABC right-angled at C and lengths of both legs, we can compute the length of the hypotenuse via Pythagora's theorem" ❙
deducedHypotenuse deducedHypotenuse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment