Giter Site home page Giter Site logo

forematics's Introduction

Forematics is a Metamath verifier written in Nim

Github Actions

Usage

forematics mm/set.mm

Metamath

Metamath is project that attempts to describe mathematics from ground up starting from very simple axioms, following very simple rules, building more and more complex theorems on top, while having everything machine checked using a very simple verifier. It has one of the largest collection of over 30,000 theorems and their proofs. Forematics is a Metamath verifier written in Nim.

Metamath is a pure math language that looks like this:

โŠข ((๐ด โˆˆ โ„ โˆง ๐ด โ‰  0) โ†’ โˆƒ๐‘ฅ โˆˆ โ„ (๐ด ยท ๐‘ฅ) = 1)

Example of an Axiom: Existence of reciprocal of nonzero real number.

Forematics

Forematics is build like any simple interpreter with with a tokenizer, parser and an eval loop. It has ability to define constants, variables, axioms and theorems (kind of like functions). It then uses a simple interpreter to verify that all theorems based on starting axioms are valid.

All "evaluation" is done by the substitution rule. There is no other built in concepts. Using the substitution rule it derives all concepts like what numbers are. Including how parentheses (), if-then, +, -, and all other math operators. It only proves 1 + 1 = 2 after defining 11086 other theorems and it proves Pythagorean theorem zยฒ = xยฒ + yยฒ after defining complex numbers after doing 24464 other theorems.

Forematics can't be used compute, derive, or solve equations, it's not a computer algebra system. At most, it's a small part of one that only deals with proofs, and very simple and constrained proofs at that.

Forematics is fast, because Nim is fast, and can verify and prove 30,000 proofs in 21 seconds.

mmverify.py

Big thanks to the https://github.com/david-a-wheeler/mmverify.py project which was used a base and insperation.

sets.mm

Download the latest set.mm from https://github.com/metamath/set.mm

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.