Code Monkey home page Code Monkey logo

rsm's People

Contributors

leotrs avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rsm's Issues

Pick the goal of a theorem in a smarter way

Currently the first claim found in the body of a theorem is chosen as the goal. We need to do better. First, if the theorem contains a ASSUME/PROVE clause, then the claim following PROVE should be chosen as the goal. Other than that, a good heuristic is to choose the last claim, not the first.

What to do with theorems that make multiple statements?

Refactoring ideas

  • refactor handrail--hug (almost all handrails are hug...)
  • refactor the position of handrail__btn-container
  • refactor AutoNumberProofs, -Theorems, and -Sections
  • use docutils.directives.class_option
  • should theorem-like even have handrail buttons? (just put them in the proof...)
  • Use something similar to the following to reduce boilerplate:
class GenericRole(object):
    def __init__(self, role_name, node_class):
        self.name = role_name
        self.node_class = node_class
    def __call__(self, role, rawtext, text, lineno, inliner,
                 options={}, content=[]):
        set_classes(options)
        return [self.node_class(rawtext, text, **options)], []

Possibility to refer to results by their title

For example, if I give a name to a Theorem like thus:

Theorem 3.1 [X implies Y] Assume A satisfies X. Then A also satisfies Y. 

I would like to refer to this theorem in the text as either Theorem 3.1 or as Theorem [X implies Y], for example:

... the following is a consequence of Theorem 3.1...
<-- OR -->
... the following is a consequence of [the fact that X implies Y]...

NOTE: Jay Cummings' long form math textbook's contain a "List of results" which lists results by their given name.

Refer to sections by number

As of the latest commit, section labels support :ref:sec:some-lbl and :ref:link text <sec:some-lbl> syntax. But it'd be great to have syntax to automatically show only their number, not their title. Perhaps this can be a setting in conf rather than a different role?

Need a new markup language

ReST was chosen because it was convenient. At this point, it has already been pushed enough to make me think that RSM needs its own native markup language. This would also drop the sphinx requirement, possibly leading to huge speed-ups.

A list of reasons why we need our own markup language follows.

  • Need a way to label inline elements #31
  • No native way to refer to sections by number #28

Proofs should track the current goal

The statement of a theorem-like should always include a claim. The claim becomes the goal of the corresponding proof. Each step's handrail should include a new button, "show goal", that would display (or highlight, if within viewport) the claim that is the current goal. For this purpose, rsm-make will have to keep track of what is the current goal. Steps can change the goal, and sub-steps generally have a goal that is a claim on their parent step, while top-level steps have a goal that is the goal of the entire proof.

New handrail button: show assumptions: a list of assumptions that are valid at that point in the manuscript

An assumption is any text that follows the ASSUME keyword. An assumption should be marked up in a span of class "assumption", similar to how claims are currently marked up.

An assumption may be introduced at any point in the manuscript. Perhaps we should even add a way of hiding an assumption so that some of them can be set at the top of the manuscript as global state.

The handrail of any block should have a button "show assumptions" which would display the assumptions that are valid at that point (not the ones that are introduced by that block).

How to display them? Perhaps we can do something basic for the manuscript itself and something more complicated for rsm-view.

Test suite

Implement tests by comparing sphinx's output to hard-coded HTML.

  • Statement contianing math
  • In sub-step: Statement contianing math
  • Statmeent made up of a single latex symbol
  • In sub-step: Statement longer than one line
  • Statement longer than one line
  • Test that :step:lbl and :step: some_latex are parsed correctly
  • Test display math in regular text, theorem statements and steps and sub-steps.
  • Reference equations using :eq:
  • author directive
  • abstract directive
  • contents directive
  • test for :prev: and :prevn: tags

Style: equation numbers should be out of the way

Equation numbers are a necessary evil. They're necessary because they are required for readers to locate themselves within the manuscript. They're evil because most of the time they are in the way and provide little information. In fact, they are mostly used as labels, and the actual numbering is unnecessary.

Because of this, their default style should be out of the way (e.g. grayed out). When highlighted/selected/hovered they should pop up. Remember: details on demand.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.