diff --git a/UPDATE_LEAN.sh b/UPDATE_LEAN.sh index 3ea0fe4..34f979f 100644 --- a/UPDATE_LEAN.sh +++ b/UPDATE_LEAN.sh @@ -5,11 +5,15 @@ cd $(dirname $0) cd server -cd testgame +cd adam lake update cp lake-packages/mathlib/lean-toolchain lean-toolchain cp lake-packages/mathlib/lean-toolchain ../leanserver/lean-toolchain +cp lake-packages/mathlib/lean-toolchain ../nng/lean-toolchain cd ../leanserver lake update + +cd ../nng +lake update diff --git a/client/src/App.tsx b/client/src/App.tsx index c1eb545..3c06cb9 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { useState, useEffect } from 'react'; -import { Outlet } from "react-router-dom"; +import { Outlet, useParams } from "react-router-dom"; import '@fontsource/roboto/300.css'; import '@fontsource/roboto/400.css'; @@ -10,10 +10,15 @@ import '@fontsource/roboto/700.css'; import './reset.css'; import './app.css'; +export const GameIdContext = React.createContext(undefined); + function App() { + const params = useParams(); return (
- + + +
) } diff --git a/client/src/components/Inventory.tsx b/client/src/components/Inventory.tsx index bde6c8e..2135760 100644 --- a/client/src/components/Inventory.tsx +++ b/client/src/components/Inventory.tsx @@ -5,6 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faLock, faLockOpen, faBook, faHammer, faBan } from '@fortawesome/free-solid-svg-icons' import Markdown from './Markdown'; import { useLoadDocQuery, ComputedInventoryItem } from '../state/api'; +import { GameIdContext } from '../App'; export function Inventory({ tactics, lemmas, definitions, setInventoryDoc } : {lemmas: ComputedInventoryItem[], @@ -55,14 +56,14 @@ function InventoryList({items, docType, openDoc} : {items: ComputedInventoryItem ).map(item => { if (tab == item.category) { return {openDoc(item.name, docType)}} - name={item.name} locked={item.locked} disabled={item.disabled} /> + name={item.name} displayName={item.displayName} locked={item.locked} disabled={item.disabled} /> } }) } } -function InventoryItem({name, locked, disabled, showDoc}) { +function InventoryItem({name, displayName, locked, disabled, showDoc}) { const icon = locked ? : disabled ? : "" const className = locked ? "locked" : disabled ? "disabled" : "" @@ -73,15 +74,15 @@ function InventoryItem({name, locked, disabled, showDoc}) { } } - return
{icon} {name}
+ return
{icon} {displayName}
} export function Documentation({name, type}) { - - const doc = useLoadDocQuery({type: type, name: name}) + const gameId = React.useContext(GameIdContext) + const doc = useLoadDocQuery({game: gameId, type: type, name: name}) return <> -

{doc.data?.name}

+

{doc.data?.displayName}

{doc.data?.text} } diff --git a/client/src/components/Level.tsx b/client/src/components/Level.tsx index 7f4437b..513a8ed 100644 --- a/client/src/components/Level.tsx +++ b/client/src/components/Level.tsx @@ -22,7 +22,7 @@ import './level.css' import { Button } from './Button' import { ConnectionContext, useLeanClient } from '../connection'; import { useGetGameInfoQuery, useLoadLevelQuery } from '../state/api'; -import { codeEdited, selectCode, progressSlice, selectCompleted } from '../state/progress'; +import { changedSelection, codeEdited, selectCode, selectSelections, progressSlice, selectCompleted } from '../state/progress'; import { useAppDispatch, useAppSelector } from '../hooks'; import { useStore } from 'react-redux'; @@ -40,6 +40,7 @@ import Markdown from './Markdown'; import Split from 'react-split' import { Alert } from '@mui/material'; +import { GameIdContext } from '../App'; export const MonacoEditorContext = React.createContext(null as any); @@ -75,7 +76,9 @@ function PlayableLevel({worldId, levelId}) { const codeviewRef = useRef(null) const introductionPanelRef = useRef(null) - const initialCode = useAppSelector(selectCode(worldId, levelId)) + const gameId = React.useContext(GameIdContext) + const initialCode = useAppSelector(selectCode(gameId, worldId, levelId)) + const initialSelections = useAppSelector(selectSelections(gameId, worldId, levelId)) const [commandLineMode, setCommandLineMode] = useState(true) const [commandLineInput, setCommandLineInput] = useState("") @@ -86,6 +89,8 @@ function PlayableLevel({worldId, levelId}) { useEffect(() => { // Scroll to top when loading a new level introductionPanelRef.current!.scrollTo(0,0) + // Reset command line input when loading a new level + setCommandLineInput("") }, [levelId]) React.useEffect(() => { @@ -122,24 +127,48 @@ function PlayableLevel({worldId, levelId}) { }]); } - const connection = React.useContext(ConnectionContext) - - const gameInfo = useGetGameInfoQuery() - - const level = useLoadLevelQuery({world: worldId, level: levelId}) + const gameInfo = useGetGameInfoQuery({game: gameId}) + const level = useLoadLevelQuery({game: gameId, world: worldId, level: levelId}) const dispatch = useAppDispatch() const onDidChangeContent = (code) => { - dispatch(codeEdited({world: worldId, level: levelId, code})) + dispatch(codeEdited({game: gameId, world: worldId, level: levelId, code})) setCanUndo(code.trim() !== "") } - const completed = useAppSelector(selectCompleted(worldId, levelId)) + const onDidChangeSelection = (monacoSelections) => { + const selections = monacoSelections.map( + ({selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn}) => + {return {selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn}}) + dispatch(changedSelection({game: gameId, world: worldId, level: levelId, selections})) + } + + const completed = useAppSelector(selectCompleted(gameId, worldId, levelId)) const {editor, infoProvider, editorConnection} = - useLevelEditor(worldId, levelId, codeviewRef, initialCode, onDidChangeContent) + useLevelEditor(worldId, levelId, codeviewRef, initialCode, initialSelections, onDidChangeContent, onDidChangeSelection) + + // Effect when command line mode gets enabled + useEffect(() => { + if (editor && commandLineMode) { + let endPos = editor.getModel().getFullModelRange().getEndPosition() + if (editor.getModel().getLineContent(endPos.lineNumber).trim() !== "") { + editor.executeEdits("command-line", [{ + range: monaco.Selection.fromPositions(endPos, endPos), + text: "\n", + forceMoveMarkers: true + }]); + } + endPos = editor.getModel().getFullModelRange().getEndPosition() + let currPos = editor.getPosition() + if (currPos.column != 1 || (currPos.lineNumber != endPos.lineNumber && currPos.lineNumber != endPos.lineNumber - 1)) { + // This is not a position that would naturally occur from CommandLine, reset: + editor.setSelection(monaco.Selection.fromPositions(endPos, endPos)) + } + } + }, [editor, commandLineMode]) const [inventoryDoc, setInventoryDoc] = useState<{name: string, type: string}>(null) @@ -151,9 +180,9 @@ function PlayableLevel({worldId, levelId}) {
- +
{level?.data?.introduction} - +
{/*

Aufgabe:

*/} @@ -177,10 +206,12 @@ function PlayableLevel({worldId, levelId}) { {completed &&
- {level?.data?.conclusion} +
+ {level?.data?.conclusion} +
{levelId >= gameInfo.data?.worldSize[worldId] ? - : - : + }
} @@ -200,23 +231,24 @@ function PlayableLevel({worldId, levelId}) { export default Level function Introduction({worldId}) { - const gameInfo = useGetGameInfoQuery() + const gameId = React.useContext(GameIdContext) + const gameInfo = useGetGameInfoQuery({game: gameId}) return <>
- +
{gameInfo.data?.worlds.nodes[worldId].introduction} - +
{0 == gameInfo.data?.worldSize[worldId] ? - : - : + }
@@ -225,11 +257,12 @@ function Introduction({worldId}) { } function LevelAppBar({isLoading, levelId, worldId, levelTitle}) { - const gameInfo = useGetGameInfoQuery() + const gameId = React.useContext(GameIdContext) + const gameInfo = useGetGameInfoQuery({game: gameId}) return
- + {gameInfo.data?.worlds.nodes[worldId].title && `World: ${gameInfo.data?.worlds.nodes[worldId].title}`} @@ -239,19 +272,20 @@ function LevelAppBar({isLoading, levelId, worldId, levelTitle}) { {levelTitle}
} -function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCode, onDidChangeContent) { +function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCode, initialSelections, onDidChangeContent, onDidChangeSelection) { const connection = React.useContext(ConnectionContext) + const gameId = React.useContext(GameIdContext) const [editor, setEditor] = useState(null) const [infoProvider, setInfoProvider] = useState(null) @@ -278,7 +312,7 @@ function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCo theme: 'vs-code-theme-converted' }) - const infoProvider = new InfoProvider(connection.getLeanClient()) + const infoProvider = new InfoProvider(connection.getLeanClient(gameId)) const editorApi = infoProvider.getApi() @@ -328,7 +362,7 @@ function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCo return () => { infoProvider.dispose(); editor.dispose() } }, []) - const {leanClient, leanClientStarted} = useLeanClient() + const {leanClient, leanClientStarted} = useLeanClient(gameId) // Create model when level changes useEffect(() => { @@ -340,8 +374,11 @@ function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCo model = monaco.editor.createModel(initialCode, 'lean4', uri) } model.onDidChangeContent(() => onDidChangeContent(model.getValue())) + editor.onDidChangeCursorSelection(() => onDidChangeSelection(editor.getSelections())) editor.setModel(model) - editor.setPosition(model.getFullModelRange().getEndPosition()) + if (initialSelections) { + editor.setSelections(initialSelections) + } infoviewApi.serverRestarted(leanClient.initializeResult) infoProvider.openPreview(editor, infoviewApi) @@ -358,7 +395,8 @@ function useLevelEditor(worldId: string, levelId: number, codeviewRef, initialCo /** Open all files in this world on the server so that they will load faster when accessed */ function useLoadWorldFiles(worldId) { - const gameInfo = useGetGameInfoQuery() + const gameId = React.useContext(GameIdContext) + const gameInfo = useGetGameInfoQuery({game: gameId}) const store = useStore() useEffect(() => { @@ -370,7 +408,7 @@ function useLoadWorldFiles(worldId) { if (model) { models.push(model) } else { - const code = selectCode(worldId, levelId)(store.getState()) + const code = selectCode(gameId, worldId, levelId)(store.getState()) models.push(monaco.editor.createModel(code, 'lean4', uri)) } } diff --git a/client/src/components/PrivacyPolicy.tsx b/client/src/components/PrivacyPolicy.tsx new file mode 100644 index 0000000..774cc36 --- /dev/null +++ b/client/src/components/PrivacyPolicy.tsx @@ -0,0 +1,52 @@ +import { faShield } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import * as React from 'react' + +const PrivacyPolicy: React.FC = () => { + const [open, setOpen] = React.useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( + +
+ +

legal

+

notes

+
+ {open? +
+
+
+
+

Privacy Policy & Impressum

+ +

Our server collects metadata (such as IP address, browser, operating system) + and the data that the user enters into the editor. The data is used to + compute the Lean output and display it to the user. The information will be stored + as long as the user stays on our website and will be deleted immediately afterwards. + We keep logs to improve our software, but the contained data is anonymized.

+ +

We do not use cookies, but your game progress is stored in the browser + as site data. Your game progress is not saved on the server; if you delete + your browser storage, it is completely gone. +

+ +

Our server is located in Germany.

+ +

Contact information:
+ Jon Eugster
+ Mathematisches Institut der Heinrich-Heine-Universität Düsseldorf
+ Universitätsstr. 1
+ 40225 Düsseldorf
+ Germany
+ jon.eugster@hhu.de + +

+
+
: null} + + ) +} + +export default PrivacyPolicy diff --git a/client/src/components/Welcome.tsx b/client/src/components/Welcome.tsx index 1c97932..a69d37f 100644 --- a/client/src/components/Welcome.tsx +++ b/client/src/components/Welcome.tsx @@ -5,7 +5,9 @@ import cytoscape, { LayoutOptions } from 'cytoscape' import klay from 'cytoscape-klay'; import { useNavigate } from 'react-router-dom'; import { useSelector } from 'react-redux'; +import Split from 'react-split' +import PrivacyPolicy from './PrivacyPolicy'; cytoscape.use( klay ); @@ -14,14 +16,25 @@ import { useGetGameInfoQuery } from '../state/api'; import { Link } from 'react-router-dom'; import Markdown from './Markdown'; import { selectCompleted } from '../state/progress'; +import { GameIdContext } from '../App'; +const N = 24 // max number of levels per world +const R = 800 // radius of a world +const r = 110 // radius of a level +const s = 100 // global scale +const padding = 2000 // padding of the graphic (on a different scale) function LevelIcon({ worldId, levelId, position }) { - const completed = useSelector(selectCompleted(worldId,levelId)) + const gameId = React.useContext(GameIdContext) + const completed = useSelector(selectCompleted(gameId, worldId,levelId)) + + const x = s * position.x + Math.sin(levelId * 2 * Math.PI / N) * (R + 1.2*r + 2*Math.floor((levelId - 1)/N)) + const y = s * position.y - Math.cos(levelId * 2 * Math.PI / N) * (R + 1.2*r + 2*Math.floor((levelId - 1)/N)) + // TODO: relative positioning? return ( - - + + ) } @@ -29,7 +42,8 @@ function LevelIcon({ worldId, levelId, position }) { function Welcome() { const navigate = useNavigate(); - const gameInfo = useGetGameInfoQuery() + const gameId = React.useContext(GameIdContext) + const gameInfo = useGetGameInfoQuery({game: gameId}) const { nodes, bounds }: any = gameInfo.data ? computeWorldLayout(gameInfo.data?.worlds) : {nodes: []} @@ -39,56 +53,66 @@ function Welcome() { } }, [gameInfo.data?.title]) - const padding = 20 - const svgElements = [] if (gameInfo.data) { for (let i in gameInfo.data.worlds.edges) { const edge = gameInfo.data.worlds.edges[i] svgElements.push( - + ) } + for (let id in nodes) { let position: cytoscape.Position = nodes[id].position - svgElements.push( - - - {nodes[id].data.title ? nodes[id].data.title : id} - - ) - for (let i = 1; i <= gameInfo.data.worldSize[id]; i++) { svgElements.push( ) } + + svgElements.push( + + + +
+

+ {nodes[id].data.title ? nodes[id].data.title : id} +

+
+
+ + ) } } - return
+ return
{ gameInfo.isLoading? - + + + : -
- - + +
+ {gameInfo.data?.introduction} - - - - {svgElements} - - -
+
+
+ + + {svgElements} + + +
+ } - +
} @@ -116,9 +140,8 @@ function computeWorldLayout(worlds) { headless: true, styleEnabled: false }) -// TODO: Jon play around with graph layout - const layout = cy.layout({name: "klay", klay: {direction: "DOWN"}} as LayoutOptions).run() + const layout = cy.layout({name: "klay", klay: {direction: "DOWN", nodePlacement: "LINEAR_SEGMENTS"}} as LayoutOptions).run() let nodes = {} cy.nodes().forEach((node, id) => { nodes[node.id()] = { diff --git a/client/src/components/infoview/CommandLine.tsx b/client/src/components/infoview/CommandLine.tsx index b565761..72fa488 100644 --- a/client/src/components/infoview/CommandLine.tsx +++ b/client/src/components/infoview/CommandLine.tsx @@ -170,21 +170,6 @@ export function CommandLine() { return () => { l.dispose() } }, [oneLineEditor, runCommand]) - // Effect when command line mode gets enabled - useEffect(() => { - if (commandLineMode) { - const endPos = editor.getModel().getFullModelRange().getEndPosition() - if (editor.getModel().getLineContent(endPos.lineNumber).trim() !== "") { - editor.executeEdits("command-line", [{ - range: monaco.Selection.fromPositions(endPos, endPos), - text: commandLineInput + "\n", - forceMoveMarkers: false - }]); - } - editor.setPosition(editor.getModel().getFullModelRange().getEndPosition()) - } - }, [commandLineMode]) - const handleSubmit : React.FormEventHandler = (ev) => { ev.preventDefault() runCommand() diff --git a/client/src/components/infoview/hints.tsx b/client/src/components/infoview/hints.tsx index 4a290fc..b7ba2b9 100644 --- a/client/src/components/infoview/hints.tsx +++ b/client/src/components/infoview/hints.tsx @@ -4,7 +4,7 @@ import { Alert, FormControlLabel, Switch } from '@mui/material'; import Markdown from '../Markdown'; function Hint({hint} : {hint: GameHint}) { - return {hint.text} + return
{hint.text}
} export function Hints({hints} : {hints: GameHint[]}) { diff --git a/client/src/components/infoview/infoview.css b/client/src/components/infoview/infoview.css index 650a679..f90c0d3 100644 --- a/client/src/components/infoview/infoview.css +++ b/client/src/components/infoview/infoview.css @@ -4,9 +4,9 @@ padding: 5px 10px; border-radius: 3px 3px 3px 3px; } -.message.information { - color: #059; - background-color: #BEF; +.message.info { + /* color: #059; */ + background-color: #DDF6FF; } .message.warning { color: #9F6000; diff --git a/client/src/components/infoview/main.tsx b/client/src/components/infoview/main.tsx index dcb0ec7..39075bd 100644 --- a/client/src/components/infoview/main.tsx +++ b/client/src/components/infoview/main.tsx @@ -18,11 +18,13 @@ import { EditorContext, ConfigContext, ProgressContext, VersionContext } from '. import { WithRpcSessions } from '../../../../node_modules/lean4-infoview/src/infoview/rpcSessions'; import { ServerVersion } from '../../../../node_modules/lean4-infoview/src/infoview/serverVersion'; import { useAppDispatch, useAppSelector } from '../../hooks'; -import { codeEdited, levelCompleted, selectCompleted } from '../../state/progress'; +import { levelCompleted, selectCompleted } from '../../state/progress'; +import { GameIdContext } from '../../App'; export function Main(props: {world: string, level: number}) { const ec = React.useContext(EditorContext); + const gameId = React.useContext(GameIdContext) const dispatch = useAppDispatch() @@ -33,13 +35,13 @@ export function Main(props: {world: string, level: number}) { if (ec.events.changedCursorLocation.current && ec.events.changedCursorLocation.current.uri === params.uri) { - dispatch(levelCompleted({world: props.world, level: props.level})) + dispatch(levelCompleted({game: gameId, world: props.world, level: props.level})) } }, [] ); - const completed = useAppSelector(selectCompleted(props.world, props.level)) + const completed = useAppSelector(selectCompleted(gameId, props.world, props.level)) /* Set up updates to the global infoview state on editor events. */ const config = useEventResult(ec.events.changedInfoviewConfig) ?? defaultInfoviewConfig; diff --git a/client/src/components/welcome.css b/client/src/components/welcome.css index 849f441..8e457a2 100644 --- a/client/src/components/welcome.css +++ b/client/src/components/welcome.css @@ -1,12 +1,191 @@ -svg .world-circle { +/* svg .world-circle { fill: var(--clr-primary) +} */ + +.welcome { + height: 100%; + flex: 1; + min-height: 0; + display: flex; +} + +.app-content { + height: 100% +} + +.welcome .column { + height: 100%; + overflow: auto; +} + +.welcome-text { + padding: 20px; +} + +h1 { + font-size: 2em; + margin: .67em 0; +} + +h2 { + font-size: 1.5em; +} + +h3 { + font-size: 1.3em; +} + +h4 { + font-size: 1.1em; + font-style: italic; +} + +h5, h6 { + font-size: 1em; + font-style: italic; +} + +/***************/ +/* SVG Graphic */ +/***************/ + +svg .world-title-wrapper { + overflow: auto; +} + +svg .world-title-wrapper div { + width: 100%; + height: 100%; +} + +svg .world-title-wrapper div { + display: flex; + align-items:center; + justify-content:center; + overflow: visible; + } -svg .world-name { - fill: white; - font-size: 2px; +svg .world-title { font-weight: 500; - text-anchor: middle; - dominant-baseline: middle; + color: white; + margin: 0; + padding: 0; +} + +/******************/ +/* Privacy Button */ +/******************/ + +.privacy { + width: 40px; + height: 40px; + font-size: 25px; + border-radius: 20px; + position: absolute; + right: 10px; + bottom: 10px; + display: flex; + align-items:center; + justify-content:center; + color: #aaa; + background-color: #eee; + cursor: pointer; +} + +.privacy p { + position: absolute; + color: #888; + bottom: 1.5px; + font-size: 6px; +} + +.privacy .p1 { + transform: rotate(50deg); + left: 1.5px; +} + +.privacy .p2 { + transform: rotate(-50deg); + right: 1.5px; +} + +/*****************/ +/* Privacy Popup */ +/*****************/ + +.modal-wrapper { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: 0; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background: rgba(0, 0, 0, 0.25); + z-index: 2; +} + +.modal h2 { + text-align: center; +} + +.modal { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + min-width: 50%; + max-width: 60ch; + background: #fff; + z-index: 3; + padding: 2em; + border-radius: 1em; + text-align: left; + color: var(--vscode-breadcrumb-foreground); +} + +.modal input[type="text"] { + width: 100%; +} + +.modal .form-error { + color: #a00; + font-weight: bold; +} + +.modal input[type="submit"] { + border: none; + color: var(--vscode-button-foreground); + background: var(--vscode-button-background); + cursor: pointer; + padding: .5em 1em; + border-radius: .2em; + display: block; + margin: 1em auto; +} + +.modal-close { + float: right; + scale: 2; + color: var(--vscode-breadcrumb-foreground); + cursor: pointer; +} + +.modal-close:hover { + float: right; + scale: 2; + color: var(--vscode-breadcrumb-focusForeground); +} + +.modal table { + width: 100%; } diff --git a/client/src/connection.ts b/client/src/connection.ts index f25b4ca..2d630ac 100644 --- a/client/src/connection.ts +++ b/client/src/connection.ts @@ -6,12 +6,17 @@ import { useState } from 'react'; export class Connection { - private leanClient = null - - getLeanClient(): LeanClient { - if (this.leanClient === null) { - const socketUrl = ((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.host + '/websocket/' + private game: string = undefined // We only keep a connection to a single game at a time + private leanClient: LeanClient = null + getLeanClient(game): LeanClient { + if (this.game !== game) { + if (this.leanClient) { + this.leanClient.stop() // Stop previous Lean client + } + this.game = game + // Start a new Lean client for the new `gameId`. + const socketUrl = ((window.location.protocol === "https:") ? "wss://" : "ws://") + window.location.host + '/websocket/' + game const uri = monaco.Uri.parse('file:///') this.leanClient = new LeanClient(socketUrl, undefined, uri, () => {}) } @@ -22,9 +27,9 @@ export class Connection { /** If not already started, starts the Lean client. resolves the returned promise as soon as a * Lean client is running. */ - startLeanClient = () => { + startLeanClient = (game) => { return new Promise((resolve) => { - const leanClient = this.getLeanClient() + const leanClient = this.getLeanClient(game) if (leanClient.isRunning()) { resolve(leanClient) } else { @@ -47,8 +52,8 @@ export const connection = new Connection() export const ConnectionContext = React.createContext(null); -export const useLeanClient = () => { - const leanClient = connection.getLeanClient() +export const useLeanClient = (gameId) => { + const leanClient = connection.getLeanClient(gameId) const [leanClientStarted, setLeanClientStarted] = useState(leanClient.isStarted()) React.useEffect(() => { diff --git a/client/src/index.tsx b/client/src/index.tsx index d13b276..20f2ac0 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -13,21 +13,26 @@ import ErrorPage from './ErrorPage'; import Welcome from './components/Welcome'; import Level from './components/Level'; import { monacoSetup } from 'lean4web/client/src/monacoSetup'; +import { redirect } from 'react-router-dom'; monacoSetup() const router = createHashRouter([ { path: "/", + loader: () => redirect("/game/adam") + }, + { + path: "/game/:gameId", element: , errorElement: , children: [ { - path: "/", + path: "/game/:gameId", element: , }, { - path: "/world/:worldId/level/:levelId", + path: "/game/:gameId/world/:worldId/level/:levelId", element: , }, ], diff --git a/client/src/state/api.ts b/client/src/state/api.ts index bd5268c..6d93733 100644 --- a/client/src/state/api.ts +++ b/client/src/state/api.ts @@ -12,6 +12,7 @@ interface GameInfo { export interface ComputedInventoryItem { name: string, + displayName: string, category: string, disabled: boolean, locked: boolean @@ -31,18 +32,19 @@ interface LevelInfo { interface Doc { name: string, + displayName: string, text: string } const customBaseQuery = async ( - args : {method: string, params?: any}, + args : {game: string, method: string, params?: any}, { signal, dispatch, getState, extra }, extraOptions ) => { try { const connection : Connection = extra.connection - let leanClient = await connection.startLeanClient() + let leanClient = await connection.startLeanClient(args.game) console.log(`Sending request ${args.method}`) let res = await leanClient.sendRequest(args.method, args.params) console.log('Received response', res) @@ -57,14 +59,14 @@ export const apiSlice = createApi({ reducerPath: 'gameApi', baseQuery: customBaseQuery, endpoints: (builder) => ({ - getGameInfo: builder.query({ - query: () => {return {method: 'info', params: {}}}, + getGameInfo: builder.query({ + query: ({game}) => {return {game, method: 'info', params: {}}}, }), - loadLevel: builder.query({ - query: ({world, level}) => {return {method: "loadLevel", params: {world, level}}}, + loadLevel: builder.query({ + query: ({game, world, level}) => {return {game, method: "loadLevel", params: {world, level}}}, }), - loadDoc: builder.query({ - query: ({name, type}) => {return {method: "loadDoc", params: {name, type}}}, + loadDoc: builder.query({ + query: ({game, name, type}) => {return {game, method: "loadDoc", params: {name, type}}}, }), }), }) diff --git a/client/src/state/localStorage.ts b/client/src/state/localStorage.ts index a290d75..729d84d 100644 --- a/client/src/state/localStorage.ts +++ b/client/src/state/localStorage.ts @@ -1,4 +1,4 @@ -const KEY = "progress"; +const KEY = "game_progress"; export function loadState() { try { const serializedState = localStorage.getItem(KEY); diff --git a/client/src/state/progress.ts b/client/src/state/progress.ts index 5512322..3d0a29c 100644 --- a/client/src/state/progress.ts +++ b/client/src/state/progress.ts @@ -3,23 +3,32 @@ import type { PayloadAction } from '@reduxjs/toolkit' import { loadState } from "./localStorage"; interface ProgressState { - level: {[world: string]: {[level: number]: LevelProgressState}} + level: {[game: string]: {[world: string]: {[level: number]: LevelProgressState}}} +} +interface Selection { + selectionStartLineNumber: number, + selectionStartColumn: number, + positionLineNumber: number + positionColumn: number } - interface LevelProgressState { code: string, + selections: Selection[], completed: boolean } const initialProgressState = loadState() ?? { level: {} } as ProgressState const initalLevelProgressState = {code: "", completed: false} as LevelProgressState -function addLevelProgress(state, action: PayloadAction<{world: string, level: number}>) { - if (!state.level[action.payload.world]) { - state.level[action.payload.world] = {} +function addLevelProgress(state, action: PayloadAction<{game: string, world: string, level: number}>) { + if (!state.level[action.payload.game]) { + state.level[action.payload.game] = {} + } + if (!state.level[action.payload.game][action.payload.world]) { + state.level[action.payload.game][action.payload.world] = {} } - if (!state.level[action.payload.world][action.payload.level]) { - state.level[action.payload.world][action.payload.level] = {...initalLevelProgressState} + if (!state.level[action.payload.game][action.payload.world][action.payload.level]) { + state.level[action.payload.game][action.payload.world][action.payload.level] = {...initalLevelProgressState} } } @@ -27,35 +36,46 @@ export const progressSlice = createSlice({ name: 'progress', initialState: initialProgressState, reducers: { - codeEdited(state, action: PayloadAction<{world: string, level: number, code: string}>) { + codeEdited(state, action: PayloadAction<{game: string, world: string, level: number, code: string}>) { + addLevelProgress(state, action) + state.level[action.payload.game][action.payload.world][action.payload.level].code = action.payload.code + state.level[action.payload.game][action.payload.world][action.payload.level].completed = false + }, + changedSelection(state, action: PayloadAction<{game: string, world: string, level: number, selections: Selection[]}>) { addLevelProgress(state, action) - state.level[action.payload.world][action.payload.level].code = action.payload.code - state.level[action.payload.world][action.payload.level].completed = false + state.level[action.payload.game][action.payload.world][action.payload.level].selections = action.payload.selections }, - levelCompleted(state, action: PayloadAction<{world: string, level: number}>) { + levelCompleted(state, action: PayloadAction<{game: string, world: string, level: number}>) { addLevelProgress(state, action) - state.level[action.payload.world][action.payload.level].completed = true + state.level[action.payload.game][action.payload.world][action.payload.level].completed = true }, } }) -export function selectLevel(world: string, level: number) { +export function selectLevel(game: string, world: string, level: number) { return (state) =>{ - if (!state.progress.level[world]) { return initalLevelProgressState } - if (!state.progress.level[world][level]) { return initalLevelProgressState } - return state.progress.level[world][level] + if (!state.progress.level[game]) { return initalLevelProgressState } + if (!state.progress.level[game][world]) { return initalLevelProgressState } + if (!state.progress.level[game][world][level]) { return initalLevelProgressState } + return state.progress.level[game][world][level] + } +} + +export function selectCode(game: string, world: string, level: number) { + return (state) => { + return selectLevel(game, world, level)(state).code } } -export function selectCode(world: string, level: number) { +export function selectSelections(game: string, world: string, level: number) { return (state) => { - return selectLevel(world, level)(state).code + return selectLevel(game, world, level)(state).selections } } -export function selectCompleted(world: string, level: number) { +export function selectCompleted(game: string, world: string, level: number) { return (state) => { - return selectLevel(world, level)(state).completed + return selectLevel(game, world, level)(state).completed } } @@ -65,4 +85,4 @@ export function selectProgress() { } } -export const { codeEdited, levelCompleted } = progressSlice.actions +export const { changedSelection, codeEdited, levelCompleted } = progressSlice.actions diff --git a/package-lock.json b/package-lock.json index 26c2ec9..2e6d55a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@types/cytoscape": "^3.19.9", "@types/react-router-dom": "^5.3.3", "cytoscape": "^3.23.0", + "cytoscape-elk": "^2.1.0", "cytoscape-klay": "^3.1.4", "debounce": "^1.2.1", "express": "^4.18.2", @@ -34,6 +35,7 @@ "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", "vscode-ws-jsonrpc": "^2.0.1", + "web-worker": "^1.2.0", "ws": "^8.11.0" }, "devDependencies": { @@ -4180,6 +4182,17 @@ "node": ">=0.10" } }, + "node_modules/cytoscape-elk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cytoscape-elk/-/cytoscape-elk-2.1.0.tgz", + "integrity": "sha512-stkKoUTNOqpyP5eMuqatK0EYir2NWGTH+XlY0rxFj0t0HiQPGI4AuSuTPaGbNM1WhVfb0tWJ5TQQ0R0qshACLw==", + "dependencies": { + "elkjs": "^0.8.1" + }, + "peerDependencies": { + "cytoscape": "^3.2.0" + } + }, "node_modules/cytoscape-klay": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/cytoscape-klay/-/cytoscape-klay-3.1.4.tgz", @@ -4435,6 +4448,11 @@ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.286.tgz", "integrity": "sha512-Vp3CVhmYpgf4iXNKAucoQUDcCrBQX3XLBtwgFqP9BUXuucgvAV9zWp1kYU7LL9j4++s9O+12cb3wMtN4SJy6UQ==" }, + "node_modules/elkjs": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/elkjs/-/elkjs-0.8.2.tgz", + "integrity": "sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ==" + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9869,6 +9887,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/web-worker": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" + }, "node_modules/webpack": { "version": "5.75.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", diff --git a/package.json b/package.json index a230586..67cab6b 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "@types/cytoscape": "^3.19.9", "@types/react-router-dom": "^5.3.3", "cytoscape": "^3.23.0", + "cytoscape-elk": "^2.1.0", "cytoscape-klay": "^3.1.4", "debounce": "^1.2.1", "express": "^4.18.2", @@ -30,6 +31,7 @@ "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", "vscode-ws-jsonrpc": "^2.0.1", + "web-worker": "^1.2.0", "ws": "^8.11.0" }, "devDependencies": { @@ -56,7 +58,7 @@ }, "scripts": { "start": "concurrently -n server,client -c blue,green \"npm run start_server\" \"npm run start_client\"", - "start_server": "cd server && (cd leanserver && lake build) && (cd testgame && lake exe cache get && lake build) && NODE_ENV=development nodemon -e mjs --exec \"node ./index.mjs\"", + "start_server": "cd server && (cd leanserver && lake build) && (cd adam && lake exe cache get && lake build) && (cd nng && lake build) && NODE_ENV=development nodemon -e mjs --exec \"node ./index.mjs\"", "start_client": "NODE_ENV=development webpack-dev-server --hot", "build": "npm run build_server && npm run build_client", "build_server": "server/build.sh", diff --git a/server/testgame/.gitignore b/server/adam/.gitignore similarity index 100% rename from server/testgame/.gitignore rename to server/adam/.gitignore diff --git a/server/testgame/.vscode/settings.json b/server/adam/.vscode/settings.json similarity index 100% rename from server/testgame/.vscode/settings.json rename to server/adam/.vscode/settings.json diff --git a/server/adam/Adam.lean b/server/adam/Adam.lean new file mode 100644 index 0000000..2f5351d --- /dev/null +++ b/server/adam/Adam.lean @@ -0,0 +1,44 @@ +import Adam.Metadata + +import Adam.Levels.Proposition +import Adam.Levels.Implication +import Adam.Levels.Predicate +import Adam.Levels.Contradiction +-- import Adam.Levels.Prime +import Adam.Levels.Sum +-- import Adam.Levels.Induction + +import Adam.Levels.Numbers +import Adam.Levels.Inequality + +import Adam.Levels.Lean +import Adam.Levels.SetTheory +import Adam.Levels.Function +import Adam.Levels.SetFunction +import Adam.Levels.LinearAlgebra + + + +Game "Adam" +Title "Lean 4 game" +Introduction +" +" + +Conclusion +"Fertig!" + + +Path Proposition → Implication → Predicate → Predicate → Contradiction → Sum → Lean +Path Predicate → Inequality → Sum +-- Path Inequality → Prime +-- Path Sum → Inequality -- → Induction + +Path Lean → SetTheory → SetTheory2 → SetFunction → Module +Path Lean → Function → SetFunction + + +Path SetTheory2 → Numbers +Path Module → Basis → Module2 + +MakeGame diff --git a/server/testgame/TestGame/HelperTools.lean b/server/adam/Adam/HelperTools.lean similarity index 100% rename from server/testgame/TestGame/HelperTools.lean rename to server/adam/Adam/HelperTools.lean diff --git a/server/adam/Adam/LemmaDocs.lean b/server/adam/Adam/LemmaDocs.lean new file mode 100644 index 0000000..2166bd9 --- /dev/null +++ b/server/adam/Adam/LemmaDocs.lean @@ -0,0 +1,514 @@ +import GameServer.Commands + +-- Wird im Level "Implication 11" ohne Beweis angenommen. +LemmaDoc not_not as "not_not" in "Logic" +" +`not_not {A : Prop} : ¬¬A ↔ A` + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `Classical` +* Minimal Import: `Std.Logic` +* Mathlib Doc: [#not_not](https://leanprover-community.github.io/mathlib4_docs/Std/Logic.html#Classical.not_not) +" + +-- Wird im Level "Implication 10" ohne Beweis angenommen. +LemmaDoc not_or_of_imp as "not_or_of_imp" in "Logic" +" +`not_or_of_imp {A B : Prop} : (A → B) → ¬A ∨ B` + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `-` +* Minimal Import: `Mathlib.Logic.Basic` +* Mathlib Doc: [#not_or_of_imp](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Logic/Basic.html#not_or_of_imp) +" + +-- Wird im Level "Implication 12" bewiesen. +LemmaDoc imp_iff_not_or as "imp_iff_not_or" in "Logic" +" +`imp_iff_not_or {A B : Prop} : (A → B) ↔ (¬A ∨ B)` + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `-` +* Minimal Import: `Mathlib.Logic.Basic` +* Mathlib Doc: [#imp_iff_not_or](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Logic/Basic.html#imp_iff_not_or) +" + +LemmaDoc Nat.succ_pos as "succ_pos" in "Nat" +" +`Nat.succ_pos (n : ℕ) : 0 < n.succ` + +$n + 1$ ist strikt grösser als Null. + +## Eigenschaften + +* `simp` Lemma: Nein +* Namespace: `Nat` +* Minimal Import: `Mathlib.Init.Prelude` +* Mathlib Doc: [#Nat.succ_pos](https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#Nat.succ_pos) +" + +LemmaDoc Nat.pos_iff_ne_zero as "pos_iff_ne_zero" in "Nat" +" +`Nat.pos_iff_ne_zero {n : ℕ} : 0 < n ↔ n ≠ 0` + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Nat` +* Minimal Import: `Std.Data.Nat.Lemmas` +* Mathlib Doc: [#Nat.pos_iff_ne_zero](https://leanprover-community.github.io/mathlib4_docs/Std/Data/Nat/Lemmas.html#Nat.pos_iff_ne_zero) +" + +-- TODO: Not minimal description +LemmaDoc zero_add as "zero_add" in "Addition" +" +`zero_add (a : ℕ) : 0 + a = a` + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `-` +* Import: `Mathlib.Nat.Basic` +* Mathlib Doc: [#zero_add](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Group/Defs.html#zero_add) +" + +LemmaDoc add_zero as "add_zero" in "Addition" +" +This lemma says `∀ a : ℕ, a + 0 = a`. + +## Eigenschaften + +* Mathlib Doc" + +LemmaDoc add_succ as "add_succ" in "Addition" +"This lemma says `∀ a b : ℕ, a + succ b = succ (a + b)`. + +## Eigenschaften + +* Mathlib Doc: [#]()" + +LemmaDoc not_forall as "not_forall" in "Logic" +" +`not_forall {α : Sort _} {P : α → Prop} : ¬(∀ x, → P x) ↔ ∃ x, ¬P x` + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `-` +* Minimal Import: `Mathlib.Logic.Basic` +* Mathlib Doc: [#not_forall](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Logic/Basic.html#not_forall) +" + +LemmaDoc not_exists as "not_exists" in "Logic" +" +`not_exists {α : Sort _} {P : α → Prop} : (¬∃ x, P x) ↔ ∀ (x : α), ¬P x. + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `-` +* Minimal Import: `Std.Logic` +* Mathlib Doc: [#not_exists](https://leanprover-community.github.io/mathlib4_docs/Std/Logic.html#not_exists)" + +LemmaDoc Nat.even_iff_not_odd as "even_iff_not_odd" in "Nat" +" +`even_iff_not_odd {n : ℕ} : Even n ↔ ¬Odd n` + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Nat` +* Minimal Import: `Mathlib.Data.Nat.Parity` +* Mathlib Doc: [#Nat.even_iff_not_odd](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Nat/Parity.html#Nat.even_iff_not_odd)" + +LemmaDoc Nat.odd_iff_not_even as "odd_iff_not_even" in "Nat" +" +`Nat.odd_iff_not_even {n : ℕ} : Odd n ↔ ¬Even n` + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `Nat` +* Minimal Import: `Mathlib.Data.Nat.Parity` +* Mathlib Doc: [#Nat.odd_iff_not_even](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Nat/Parity.html#Nat.odd_iff_not_even)" + +LemmaDoc even_square as "even_square" in "Nat" +" +`even_square : (n : ℕ), Even n → Even (n ^ 2)` + +## Eigenschaften + +* `simp`-Lemma: Nein +* *Nicht in Mathlib* +" + + + + +LemmaDoc Set.mem_univ as "mem_univ" in "Set" +" +`Set.mem_univ {α : Type _} (x : α) : x ∈ @univ α` + +Jedes Element ist in `univ`, der Menge aller Elemente eines Typs `α`. + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `Set` +* Minimal Import: `Mathlib.Data.Set.Basic` +* Mathlib Doc: [#mem_univ](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.mem_univ) +" + +LemmaDoc not_mem_empty as "not_mem_empty" in "Set" +" +`Set.not_mem_empty {α : Type _} (x : α) : x ∉ ∅` + +Kein Element ist in der leeren Menge. + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Set` +* Minimal Import: `Mathlib.Data.Set.Basic` +* Mathlib Doc: [#not_mem_empty](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.not_mem_empty) +" + +LemmaDoc empty_subset as "empty_subset" in "Set" +" +`Set.empty_subset {α : Type u} (s : Set α) : ∅ ⊆ s` + +## Eigenschaften + +* `simp`-Lemma: Ja +* Namespace: `Set` +* Minimal Import: `Mathlib.Data.Set.Basic` +* Mathlib Doc: [#empty_subset](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.empty_subset) +" + +LemmaDoc Subset.antisymm as "Subset.antisymm" in "Set" +" +`Set.Subset.antisymm {α : Type u} {a : Set α} {b : Set α} (h₁ : a ⊆ b) (h₂ : b ⊆ a) : a = b` + +Zwei Mengen sind identisch, wenn sowohl $A \\subseteq B$ wie auch $B \\subseteq A$. +## Details + +`apply Subset.antisymm` ist eine Möglichkeit Gleichungen von Mengen zu zeigen. +eine andere ist `ext i`, welches Elementweise funktiniert. +Siehe auch +[`#Subset.antisymm_iff`](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.Subset.antisymm_iff) +für die Iff-Version. + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Set.Subset` +* Minimal Import: `Mathlib.Data.Set.Basic` +* Mathlib Doc: [#Subset.antisymm](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.Subset.antisymm) +" + +LemmaDoc Subset.antisymm_iff as "Subset.antisymm_iff" in "Set" +" +`Set.Subset.antisymm_iff {α : Type u} {a : Set α} {b : Set α} : a = b ↔ a ⊆ b ∧ b ⊆ a` + +Zwei Mengen sind identisch, wenn sowohl $A \\subseteq B$ wie auch $B \\subseteq A$. + +## Details + +`rw [Subset.antisymm_iff]` ist eine Möglichkeit Gleichungen von Mengen zu zeigen. +eine andere ist `ext i`, welches Elementweise funktiniert. +Siehe auch +[`#Subset.antisymm`](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.Subset.antisymm) +für eine verwandte Version. + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Set.Subset` +* Minimal Import: `Mathlib.Data.Set.Basic` +* Mathlib Doc: [#Subset.antisymm_iff](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Set/Basic.html#Set.Subset.antisymm_iff) +" + + +LemmaDoc Nat.prime_def_lt'' as "prime_def_lt''" in "Nat" +" +`Nat.prime_def_lt'' {p : ℕ} : +Nat.Prime p ↔ 2 ≤ p ∧ ∀ (m : ℕ), m ∣ p → m = 1 ∨ m = p` + +Die bekannte Definition einer Primmzahl in `ℕ`: Eine Zahl (`p ≥ 2`) mit genau zwei Teilern. + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Nat` +* Mathlib Doc: [#Nat.prime_def_lt''](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Nat/Prime.html#Nat.prime_def_lt'') +" + + +LemmaDoc Finset.sum_add_distrib as "sum_add_distrib" in "Sum" +" + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Finset` +* Mathlib Doc: [#Finset.sum_add_distrib](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/BigOperators/Basic.html#Finset.sum_add_distrib) +" + +LemmaDoc Fin.sum_univ_castSucc as "sum_univ_castSucc" in "Sum" +" + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Fin` +* Mathlib Doc: [#sum_univ_castSucc](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/BigOperators/Fin.html#Fin.sum_univ_castSucc) +" + +LemmaDoc Nat.succ_eq_add_one as "succ_eq_add_one" in "Sum" +" + +## Eigenschaften + +* `simp`-Lemma: Nein +* Namespace: `Nat` +* Mathlib Doc: [#succ_eq_add_one](https://leanprover-community.github.io/mathlib4_docs/Init/Data/Nat/Basic.html#Nat.succ_eq_add_one) +" + +LemmaDoc Nat.zero_eq as "zero_eq" in "Sum" +" + +## Eigenschaften + +* Mathlib Doc: [#zero_eq](https://leanprover-community.github.io/mathlib4_docs/Init/Data/Nat/Basic.html#Nat.zero_eq) +" + +LemmaDoc add_comm as "add_comm" in "Nat" +" + +## Eigenschaften + +* Mathlib Doc: [#add_comm](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Group/Defs.html#add_comm) +" + +LemmaDoc mul_add as "mul_add" in "Nat" +" + +## Eigenschaften + +* Mathlib Doc: [#mul_add](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Ring/Defs.html#mul_add) +" + +LemmaDoc add_mul as "add_mul" in "Nat" +" + +## Eigenschaften + +* Mathlib Doc: [#add_mul](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Ring/Defs.html#add_mul) +" + +LemmaDoc arithmetic_sum as "arithmetic_sum" in "Sum" +" + +## Eigenschaften + +* Not a mathlib lemma. +" + +LemmaDoc add_pow_two as "add_pow_two" in "Nat" +" + +## Eigenschaften + +* Mathlib Doc: [#add_pow_two](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/GroupPower/Ring.html#add_pow_two) +" + +LemmaDoc Finset.sum_comm as "Finset.sum_comm" in "Sum" +" + +## Eigenschaften + +* Mathlib Doc: [#sum_comm](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/BigOperators/Basic.html#Finset.sum_comm) +" + +LemmaDoc Function.comp_apply as "Function.comp_apply" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#comp_apply](https://leanprover-community.github.io/mathlib4_docs/Init/Core.html#Function.comp_apply) +" + +LemmaDoc not_le as "not_le" in "Logic" +" + +## Eigenschaften + +* Mathlib Doc: [#not_le](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Algebra/Order.html#not_le) +" + +LemmaDoc if_pos as "if_pos" in "Logic" +" + +## Eigenschaften + +* Mathlib Doc: [#if_pos](https://leanprover-community.github.io/mathlib4_docs/Init/Core.html#if_pos) +" + +LemmaDoc if_neg as "if_neg" in "Logic" +" + +## Eigenschaften + +* Mathlib Doc: [#if_neg](https://leanprover-community.github.io/mathlib4_docs/Init/Core.html#if_neg) +" + +LemmaDoc StrictMono.injective as "StrictMono.injective" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#StrictMono.injective](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Order/Monotone/Basic.html#StrictMono.injective) +" + +LemmaDoc StrictMono.add as "StrictMono.add" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#StrictMono.add](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Order/Monoid/Lemmas.html#StrictMono.add) +" + +LemmaDoc Odd.strictMono_pow as "Odd.strictMono_pow" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#Odd.strictMono_pow](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Parity.html#Odd.strictMono_pow) +" + +LemmaDoc Exists.choose as "Exists.choose" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#Exists.choose](https://leanprover-community.github.io/mathlib4_docs/Std/Logic.html#Exists.choose) +" + +LemmaDoc Exists.choose_spec as "Exists.choose_spec" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#Exists.choose_spec](https://leanprover-community.github.io/mathlib4_docs/Std/Logic.html#Exists.choose_spec) +" +LemmaDoc congrArg as "congrArg" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#congrArg](https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#congrArg) +" +LemmaDoc congrFun as "congrFun" in "Function" +" + +## Eigenschaften + +* Mathlib Doc: [#congrFun](https://leanprover-community.github.io/mathlib4_docs/Init/Prelude.html#congrFun) +" + +LemmaDoc Iff.symm as "Iff.symm" in "Logic" +" + +## Eigenschaften + +* Mathlib Doc: [#Iff.symm](https://leanprover-community.github.io/mathlib4_docs/Init/Core.html#Iff.symm) +" + + + +/-! ## Definitions -/ + +DefinitionDoc Even as "Even" +" +`even n` ist definiert als `∃ r, a = 2 * r`. +Die Definition kann man mit `unfold even at *` einsetzen. +## Eigenschaften + +* Mathlib Doc: [#Even](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Parity.html#Even)" + +DefinitionDoc Odd as "Odd" +" +`odd n` ist definiert als `∃ r, a = 2 * r + 1`. +Die Definition kann man mit `unfold odd at *` einsetzen. + +* Mathlib Doc: [Odd](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Parity.html#Odd)" + +DefinitionDoc Injective as "Injective" +" +`Injective f` ist definiert als + +``` +∀ a b, f a = f b → a = b +``` +definiert. + +* Mathlib Doc: [Injective](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Function.html#Function.Injective)" + +DefinitionDoc Surjective as "Surjective" +" +`Surjective f` ist definiert als + +``` +∀ a, (∃ b, f a = b) +``` + +* Mathlib Doc: [Surjective](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Function.html#Function.Surjective)" + +DefinitionDoc Bijective as "Bijective" +" + +## Eigenschaften + +* Mathlib Doc: [#Bijective](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Function.html#Function.Bijective) +" + +DefinitionDoc LeftInverse as "LeftInverse" +" + +## Eigenschaften + +* Mathlib Doc: [#LeftInverse](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Function.html#Function.LeftInverse) +" + +DefinitionDoc RightInverse as "RightInverse" +" + +## Eigenschaften + +* Mathlib Doc: [#RightInverse](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Init/Logic.html#RightInverse) +" + +DefinitionDoc StrictMono as "StrictMono" +" +`StrictMono f` ist definiert als + +``` +∀ a b, a < b → f a < f b +``` + +## Eigenschaften + +* Mathlib Doc: [#StrictMono](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Order/Monotone/Basic.html#StrictMono) + +" + +DefinitionDoc Symbol.Subset as "⊆" " + +Auf Mengen (`Set`) ist `A ⊆ B` als `∀x, x ∈ A → x ∈ B` implementiert. +" diff --git a/server/adam/Adam/Levels/Contradiction.lean b/server/adam/Adam/Levels/Contradiction.lean new file mode 100644 index 0000000..a7cdde7 --- /dev/null +++ b/server/adam/Adam/Levels/Contradiction.lean @@ -0,0 +1,16 @@ +import Adam.Levels.Contradiction.L01_Have +import Adam.Levels.Contradiction.L02_Suffices +import Adam.Levels.Contradiction.L03_ByContra +import Adam.Levels.Contradiction.L04_ByContra +import Adam.Levels.Contradiction.L05_Contrapose +import Adam.Levels.Contradiction.L06_Summary + +Game "Adam" +World "Contradiction" +Title "Widerspruch" + +Introduction " +Ihr begebt euch auf die Suche nach *Oddeus*. Nach etwas rumfragen, kommt ihr tatsächlich an +eine Dornenfestung und nachdem ihr erklärt habt, wer ihr seit, werdet ihr auf eine Audienz +gebeten. +" diff --git a/server/testgame/TestGame/Levels/Contradiction/L01_Have.lean b/server/adam/Adam/Levels/Contradiction/L01_Have.lean similarity index 96% rename from server/testgame/TestGame/Levels/Contradiction/L01_Have.lean rename to server/adam/Adam/Levels/Contradiction/L01_Have.lean index e80a472..01d4aa3 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L01_Have.lean +++ b/server/adam/Adam/Levels/Contradiction/L01_Have.lean @@ -1,13 +1,13 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 1 diff --git a/server/testgame/TestGame/Levels/Contradiction/L02_Suffices.lean b/server/adam/Adam/Levels/Contradiction/L02_Suffices.lean similarity index 96% rename from server/testgame/TestGame/Levels/Contradiction/L02_Suffices.lean rename to server/adam/Adam/Levels/Contradiction/L02_Suffices.lean index 5480fe4..ac8f762 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L02_Suffices.lean +++ b/server/adam/Adam/Levels/Contradiction/L02_Suffices.lean @@ -1,13 +1,13 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 2 diff --git a/server/testgame/TestGame/Levels/Contradiction/L03_ByContra.lean b/server/adam/Adam/Levels/Contradiction/L03_ByContra.lean similarity index 96% rename from server/testgame/TestGame/Levels/Contradiction/L03_ByContra.lean rename to server/adam/Adam/Levels/Contradiction/L03_ByContra.lean index c9e4013..4a178bf 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L03_ByContra.lean +++ b/server/adam/Adam/Levels/Contradiction/L03_ByContra.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight import Mathlib.Tactic.Contrapose @@ -6,9 +6,9 @@ import Mathlib.Tactic.Use import Mathlib.Tactic.Ring import Mathlib -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 3 diff --git a/server/testgame/TestGame/Levels/Contradiction/L04_ByContra.lean b/server/adam/Adam/Levels/Contradiction/L04_ByContra.lean similarity index 94% rename from server/testgame/TestGame/Levels/Contradiction/L04_ByContra.lean rename to server/adam/Adam/Levels/Contradiction/L04_ByContra.lean index 769a4cc..f9530cc 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L04_ByContra.lean +++ b/server/adam/Adam/Levels/Contradiction/L04_ByContra.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight import Mathlib.Tactic.Contrapose @@ -6,9 +6,9 @@ import Mathlib.Tactic.Use import Mathlib.Tactic.Ring import Mathlib -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 4 diff --git a/server/testgame/TestGame/Levels/Contradiction/L05_Contrapose.lean b/server/adam/Adam/Levels/Contradiction/L05_Contrapose.lean similarity index 96% rename from server/testgame/TestGame/Levels/Contradiction/L05_Contrapose.lean rename to server/adam/Adam/Levels/Contradiction/L05_Contrapose.lean index 6377dec..e2df673 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L05_Contrapose.lean +++ b/server/adam/Adam/Levels/Contradiction/L05_Contrapose.lean @@ -1,12 +1,12 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 5 diff --git a/server/testgame/TestGame/Levels/Contradiction/L06_Summary.lean b/server/adam/Adam/Levels/Contradiction/L06_Summary.lean similarity index 96% rename from server/testgame/TestGame/Levels/Contradiction/L06_Summary.lean rename to server/adam/Adam/Levels/Contradiction/L06_Summary.lean index 64693b0..1e32524 100644 --- a/server/testgame/TestGame/Levels/Contradiction/L06_Summary.lean +++ b/server/adam/Adam/Levels/Contradiction/L06_Summary.lean @@ -1,12 +1,12 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Contradiction" Level 6 diff --git a/server/adam/Adam/Levels/Function.lean b/server/adam/Adam/Levels/Function.lean new file mode 100644 index 0000000..91a8bbe --- /dev/null +++ b/server/adam/Adam/Levels/Function.lean @@ -0,0 +1,24 @@ +import Adam.Levels.Function.L01_Function +import Adam.Levels.Function.L02_Let +import Adam.Levels.Function.L03_Piecewise +import Adam.Levels.Function.L04_Injective +import Adam.Levels.Function.L05_Injective +import Adam.Levels.Function.L06_Injective +import Adam.Levels.Function.L07_Surjective +import Adam.Levels.Function.L08_Bijective +import Adam.Levels.Function.L09_Inverse +import Adam.Levels.Function.L11_Inverse + +Game "Adam" +World "Function" +Title "Abbildungen" + +Introduction " +Auf der Suche nach dem Buch der Urbilder landet ihr auf einem kleinen Mond, der bis auf +eine Insel komplett mit Wasser bedeckt zu sein scheint. + +Auf der Insel seht ihr verschiedene große und kleine Behausungen, manche aus Stroh und Holz, +vereinzelte aus Lehm. + +Planlos geht ihr zum ersten Haus bei dem jemand vorne außen sitzt. +" diff --git a/server/testgame/TestGame/Levels/Function/L01_Function.lean b/server/adam/Adam/Levels/Function/L01_Function.lean similarity index 97% rename from server/testgame/TestGame/Levels/Function/L01_Function.lean rename to server/adam/Adam/Levels/Function/L01_Function.lean index 1bce9e1..52607f9 100644 --- a/server/testgame/TestGame/Levels/Function/L01_Function.lean +++ b/server/adam/Adam/Levels/Function/L01_Function.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 1 diff --git a/server/testgame/TestGame/Levels/Function/L02_Let.lean b/server/adam/Adam/Levels/Function/L02_Let.lean similarity index 98% rename from server/testgame/TestGame/Levels/Function/L02_Let.lean rename to server/adam/Adam/Levels/Function/L02_Let.lean index b996425..80c95c6 100644 --- a/server/testgame/TestGame/Levels/Function/L02_Let.lean +++ b/server/adam/Adam/Levels/Function/L02_Let.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 2 diff --git a/server/testgame/TestGame/Levels/Function/L03_Piecewise.lean b/server/adam/Adam/Levels/Function/L03_Piecewise.lean similarity index 99% rename from server/testgame/TestGame/Levels/Function/L03_Piecewise.lean rename to server/adam/Adam/Levels/Function/L03_Piecewise.lean index 8c1615b..591a081 100644 --- a/server/testgame/TestGame/Levels/Function/L03_Piecewise.lean +++ b/server/adam/Adam/Levels/Function/L03_Piecewise.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 3 diff --git a/server/testgame/TestGame/Levels/Function/L04_Injective.lean b/server/adam/Adam/Levels/Function/L04_Injective.lean similarity index 95% rename from server/testgame/TestGame/Levels/Function/L04_Injective.lean rename to server/adam/Adam/Levels/Function/L04_Injective.lean index 0946ab4..b21a7fc 100644 --- a/server/testgame/TestGame/Levels/Function/L04_Injective.lean +++ b/server/adam/Adam/Levels/Function/L04_Injective.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 4 diff --git a/server/testgame/TestGame/Levels/Function/L05_Injective.lean b/server/adam/Adam/Levels/Function/L05_Injective.lean similarity index 98% rename from server/testgame/TestGame/Levels/Function/L05_Injective.lean rename to server/adam/Adam/Levels/Function/L05_Injective.lean index 48f0172..17bf39f 100644 --- a/server/testgame/TestGame/Levels/Function/L05_Injective.lean +++ b/server/adam/Adam/Levels/Function/L05_Injective.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Function" Level 5 diff --git a/server/testgame/TestGame/Levels/Function/L06_Injective.lean b/server/adam/Adam/Levels/Function/L06_Injective.lean similarity index 97% rename from server/testgame/TestGame/Levels/Function/L06_Injective.lean rename to server/adam/Adam/Levels/Function/L06_Injective.lean index 4e61007..2335749 100644 --- a/server/testgame/TestGame/Levels/Function/L06_Injective.lean +++ b/server/adam/Adam/Levels/Function/L06_Injective.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 6 diff --git a/server/testgame/TestGame/Levels/Function/L07_Surjective.lean b/server/adam/Adam/Levels/Function/L07_Surjective.lean similarity index 94% rename from server/testgame/TestGame/Levels/Function/L07_Surjective.lean rename to server/adam/Adam/Levels/Function/L07_Surjective.lean index 27906d8..7f493b3 100644 --- a/server/testgame/TestGame/Levels/Function/L07_Surjective.lean +++ b/server/adam/Adam/Levels/Function/L07_Surjective.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 7 diff --git a/server/testgame/TestGame/Levels/Function/L08_Bijective.lean b/server/adam/Adam/Levels/Function/L08_Bijective.lean similarity index 89% rename from server/testgame/TestGame/Levels/Function/L08_Bijective.lean rename to server/adam/Adam/Levels/Function/L08_Bijective.lean index 1fc8135..98aec98 100644 --- a/server/testgame/TestGame/Levels/Function/L08_Bijective.lean +++ b/server/adam/Adam/Levels/Function/L08_Bijective.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 8 @@ -33,6 +33,6 @@ Hint : Bijective (fun (n : ℤ) ↦ n + 1) => Conclusion "Zufrieden drückt euch der Gelehrte eine neue Fackel in die Hand und -zeigt euch den Weg nach draussen." +zeigt euch den Weg nach draußen." NewDefinition Bijective diff --git a/server/testgame/TestGame/Levels/Function/L09_Inverse.lean b/server/adam/Adam/Levels/Function/L09_Inverse.lean similarity index 97% rename from server/testgame/TestGame/Levels/Function/L09_Inverse.lean rename to server/adam/Adam/Levels/Function/L09_Inverse.lean index 548d01e..120ccbd 100644 --- a/server/testgame/TestGame/Levels/Function/L09_Inverse.lean +++ b/server/adam/Adam/Levels/Function/L09_Inverse.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 9 diff --git a/server/testgame/TestGame/Levels/Function/L11_Inverse.lean b/server/adam/Adam/Levels/Function/L11_Inverse.lean similarity index 98% rename from server/testgame/TestGame/Levels/Function/L11_Inverse.lean rename to server/adam/Adam/Levels/Function/L11_Inverse.lean index 14ac036..f6b0c68 100644 --- a/server/testgame/TestGame/Levels/Function/L11_Inverse.lean +++ b/server/adam/Adam/Levels/Function/L11_Inverse.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Function" Level 10 diff --git a/server/testgame/TestGame/Levels/Implication.lean b/server/adam/Adam/Levels/Implication.lean similarity index 51% rename from server/testgame/TestGame/Levels/Implication.lean rename to server/adam/Adam/Levels/Implication.lean index 0d06e71..6b77705 100644 --- a/server/testgame/TestGame/Levels/Implication.lean +++ b/server/adam/Adam/Levels/Implication.lean @@ -1,18 +1,18 @@ -import TestGame.Levels.Implication.L01_Intro -import TestGame.Levels.Implication.L02_Revert -import TestGame.Levels.Implication.L03_Apply -import TestGame.Levels.Implication.L04_Apply -import TestGame.Levels.Implication.L05_Apply -import TestGame.Levels.Implication.L06_Iff -import TestGame.Levels.Implication.L07_Rw -import TestGame.Levels.Implication.L08_Iff -import TestGame.Levels.Implication.L09_Iff -import TestGame.Levels.Implication.L10_Apply -import TestGame.Levels.Implication.L11_ByCases -import TestGame.Levels.Implication.L12_Rw -import TestGame.Levels.Implication.L13_Summary +import Adam.Levels.Implication.L01_Intro +import Adam.Levels.Implication.L02_Revert +import Adam.Levels.Implication.L03_Apply +import Adam.Levels.Implication.L04_Apply +import Adam.Levels.Implication.L05_Apply +import Adam.Levels.Implication.L06_Iff +import Adam.Levels.Implication.L07_Rw +import Adam.Levels.Implication.L08_Iff +import Adam.Levels.Implication.L09_Iff +import Adam.Levels.Implication.L10_Apply +import Adam.Levels.Implication.L11_ByCases +import Adam.Levels.Implication.L12_Rw +import Adam.Levels.Implication.L13_Summary -Game "TestGame" +Game "Adam" World "Implication" Title "Aussagenlogik 2" @@ -28,7 +28,7 @@ aber niemand von den Einwohnern wusste was davon... erzählen… Und damit leitet Robo den Landeanflug ein. Implis scheint ein riesiger Tagbau zu sein auf -dem nach allem möglichen gegraben wird. Überall seht ihr Förderbänder kreuz und queer. +dem nach allem möglichen gegraben wird. Überall seht ihr Förderbänder kreuz und quer. Das Operationsteam begrüsst euch freundlich und lädt zum Essen im Kommandoturm. " diff --git a/server/testgame/TestGame/Levels/Implication/L01_Intro.lean b/server/adam/Adam/Levels/Implication/L01_Intro.lean similarity index 82% rename from server/testgame/TestGame/Levels/Implication/L01_Intro.lean rename to server/adam/Adam/Levels/Implication/L01_Intro.lean index 7a60817..97fef55 100644 --- a/server/testgame/TestGame/Levels/Implication/L01_Intro.lean +++ b/server/adam/Adam/Levels/Implication/L01_Intro.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Tauto set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 1 @@ -18,7 +18,8 @@ Statement (A B : Prop) (hb : B) : A → (A ∧ B) := by Hint "**Du**: Einen Moment, das ist eine Implikation (`\\to`), also `A` impliziert `A und B`, soweit so gut, also eine Tautologie. - **Robo**: Die scheinen hier `tauto` auch nicht zu verstehen. + **Robo**: Du hast recht, eigentlich könnte man `tauto` sagen, + aber das scheinen die hier tauto nicht zu verstehen. Implikationen kannst du aber mit `intro h` angehen." intro hA Hint "**Du**: Jetzt habe ich also angenommen, dass `A` wahr ist und muss `A ∧ B` zeigen, diff --git a/server/testgame/TestGame/Levels/Implication/L02_Revert.lean b/server/adam/Adam/Levels/Implication/L02_Revert.lean similarity index 95% rename from server/testgame/TestGame/Levels/Implication/L02_Revert.lean rename to server/adam/Adam/Levels/Implication/L02_Revert.lean index f05a5c9..5345c60 100644 --- a/server/testgame/TestGame/Levels/Implication/L02_Revert.lean +++ b/server/adam/Adam/Levels/Implication/L02_Revert.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 2 diff --git a/server/testgame/TestGame/Levels/Implication/L03_Apply.lean b/server/adam/Adam/Levels/Implication/L03_Apply.lean similarity index 60% rename from server/testgame/TestGame/Levels/Implication/L03_Apply.lean rename to server/adam/Adam/Levels/Implication/L03_Apply.lean index 5d917f4..30eb21f 100644 --- a/server/testgame/TestGame/Levels/Implication/L03_Apply.lean +++ b/server/adam/Adam/Levels/Implication/L03_Apply.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Implication" Level 3 @@ -11,17 +11,10 @@ Introduction " Sein Kollege zieht eine Linie unter deinen Beweis, schreibt ein durchgestrichenes ~`revert`~ hin und gibt dir das Blatt wieder. -`revert` ist aber nur selten der richtige Weg. - -Im vorigen Beispiel würde man besser die Implikation $A \\Rightarrow B$ *anwenden*, also -sagen \"Es genügt $A$ zu zeigen, denn $A \\Rightarrow B$\" und danach $A$ beweisen. - -Wenn man eine Implikation `(g : A → B)` in den Annahmen hat, bei welcher die Konsequenz -(also $B$) mit dem Goal übereinstimmt, kann man `apply g` genau dies machen. " Statement (A B : Prop) (hA : A) (h : A → B) : B := by - Hint "**Robo**: Du hast natürlich recht, normalerweise ist es viel schöner mit + Hint "**Robo**: Da hat er natürlich recht, normalerweise ist es viel schöner mit `apply {h}` die Implikation anzuwenden." apply h Hint "**Du**: Und jetzt genügt es also `A` zu zeigen." diff --git a/server/testgame/TestGame/Levels/Implication/L04_Apply.lean b/server/adam/Adam/Levels/Implication/L04_Apply.lean similarity index 96% rename from server/testgame/TestGame/Levels/Implication/L04_Apply.lean rename to server/adam/Adam/Levels/Implication/L04_Apply.lean index 1d4a7a9..bef022c 100644 --- a/server/testgame/TestGame/Levels/Implication/L04_Apply.lean +++ b/server/adam/Adam/Levels/Implication/L04_Apply.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 4 diff --git a/server/testgame/TestGame/Levels/Implication/L05_Apply.lean b/server/adam/Adam/Levels/Implication/L05_Apply.lean similarity index 92% rename from server/testgame/TestGame/Levels/Implication/L05_Apply.lean rename to server/adam/Adam/Levels/Implication/L05_Apply.lean index 78b48cc..ef92b93 100644 --- a/server/testgame/TestGame/Levels/Implication/L05_Apply.lean +++ b/server/adam/Adam/Levels/Implication/L05_Apply.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Implication" Level 5 @@ -8,7 +8,7 @@ Title "Implikation" Introduction " -Selbstsicher folgt ihr den Anweisungen und geht nach draussen zum +Selbstsicher folgt ihr den Anweisungen und geht nach draußen zum defekten Kontrollelement. Dieses zeigt ein kompliziertes Diagram: $$ \\begin{CD} diff --git a/server/testgame/TestGame/Levels/Implication/L06_Iff.lean b/server/adam/Adam/Levels/Implication/L06_Iff.lean similarity index 89% rename from server/testgame/TestGame/Levels/Implication/L06_Iff.lean rename to server/adam/Adam/Levels/Implication/L06_Iff.lean index 7f5ea41..3941d32 100644 --- a/server/testgame/TestGame/Levels/Implication/L06_Iff.lean +++ b/server/adam/Adam/Levels/Implication/L06_Iff.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Implication" Level 6 @@ -37,7 +37,7 @@ hier bei `(h : A ↔ B)` heissen sie `h.mp` und `h.mpr`. **Operationsleiter**: \"Modulo Ponens\" ist ein lokaler Begriff hier, aber das ist doch nicht wichtig. -**Robo**: Und das \"r\" in `mpr` stünde für \"reverse\" weils die Rückrichtung ist. +**Robo**: Und das \"r\" in `mpr` stünde für \"reverse\" weil's die Rückrichtung ist. " NewTactic constructor diff --git a/server/testgame/TestGame/Levels/Implication/L07_Rw.lean b/server/adam/Adam/Levels/Implication/L07_Rw.lean similarity index 94% rename from server/testgame/TestGame/Levels/Implication/L07_Rw.lean rename to server/adam/Adam/Levels/Implication/L07_Rw.lean index a224432..dc1fa5d 100644 --- a/server/testgame/TestGame/Levels/Implication/L07_Rw.lean +++ b/server/adam/Adam/Levels/Implication/L07_Rw.lean @@ -1,9 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Init.Data.ToString -- #check List UInt8 -Game "TestGame" +set_option tactic.hygienic false + +Game "Adam" World "Implication" Level 7 diff --git a/server/testgame/TestGame/Levels/Implication/L08_Iff.lean b/server/adam/Adam/Levels/Implication/L08_Iff.lean similarity index 96% rename from server/testgame/TestGame/Levels/Implication/L08_Iff.lean rename to server/adam/Adam/Levels/Implication/L08_Iff.lean index 8801210..0cd443d 100644 --- a/server/testgame/TestGame/Levels/Implication/L08_Iff.lean +++ b/server/adam/Adam/Levels/Implication/L08_Iff.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 8 diff --git a/server/testgame/TestGame/Levels/Implication/L09_Iff.lean b/server/adam/Adam/Levels/Implication/L09_Iff.lean similarity index 97% rename from server/testgame/TestGame/Levels/Implication/L09_Iff.lean rename to server/adam/Adam/Levels/Implication/L09_Iff.lean index daede52..60835df 100644 --- a/server/testgame/TestGame/Levels/Implication/L09_Iff.lean +++ b/server/adam/Adam/Levels/Implication/L09_Iff.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Cases -Game "TestGame" +Game "Adam" World "Implication" Level 9 diff --git a/server/testgame/TestGame/Levels/Implication/L10_Apply.lean b/server/adam/Adam/Levels/Implication/L10_Apply.lean similarity index 96% rename from server/testgame/TestGame/Levels/Implication/L10_Apply.lean rename to server/adam/Adam/Levels/Implication/L10_Apply.lean index 8905f6f..5e47099 100644 --- a/server/testgame/TestGame/Levels/Implication/L10_Apply.lean +++ b/server/adam/Adam/Levels/Implication/L10_Apply.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Cases import Mathlib -Game "TestGame" +Game "Adam" World "Implication" Level 10 diff --git a/server/testgame/TestGame/Levels/Implication/L11_ByCases.lean b/server/adam/Adam/Levels/Implication/L11_ByCases.lean similarity index 94% rename from server/testgame/TestGame/Levels/Implication/L11_ByCases.lean rename to server/adam/Adam/Levels/Implication/L11_ByCases.lean index 7493335..d5048b4 100644 --- a/server/testgame/TestGame/Levels/Implication/L11_ByCases.lean +++ b/server/adam/Adam/Levels/Implication/L11_ByCases.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Cases import Mathlib -Game "TestGame" +Game "Adam" World "Implication" Level 11 diff --git a/server/testgame/TestGame/Levels/Implication/L12_Rw.lean b/server/adam/Adam/Levels/Implication/L12_Rw.lean similarity index 96% rename from server/testgame/TestGame/Levels/Implication/L12_Rw.lean rename to server/adam/Adam/Levels/Implication/L12_Rw.lean index ed9683a..5685c3a 100644 --- a/server/testgame/TestGame/Levels/Implication/L12_Rw.lean +++ b/server/adam/Adam/Levels/Implication/L12_Rw.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Cases import Mathlib.Logic.Basic -Game "TestGame" +Game "Adam" World "Implication" Level 12 diff --git a/server/testgame/TestGame/Levels/Implication/L13_Summary.lean b/server/adam/Adam/Levels/Implication/L13_Summary.lean similarity index 98% rename from server/testgame/TestGame/Levels/Implication/L13_Summary.lean rename to server/adam/Adam/Levels/Implication/L13_Summary.lean index 6de3e35..0e86aad 100644 --- a/server/testgame/TestGame/Levels/Implication/L13_Summary.lean +++ b/server/adam/Adam/Levels/Implication/L13_Summary.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight import Mathlib set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 13 diff --git a/server/adam/Adam/Levels/Induction.lean b/server/adam/Adam/Levels/Induction.lean new file mode 100644 index 0000000..5e77bb6 --- /dev/null +++ b/server/adam/Adam/Levels/Induction.lean @@ -0,0 +1,5 @@ +import Adam.Levels.Induction.L01_Induction + +Game "Adam" +World "Induction" +Title "Übungen Induktions" diff --git a/server/testgame/TestGame/Levels/Induction/L01_Induction.lean b/server/adam/Adam/Levels/Induction/L01_Induction.lean similarity index 94% rename from server/testgame/TestGame/Levels/Induction/L01_Induction.lean rename to server/adam/Adam/Levels/Induction/L01_Induction.lean index f2804b9..66a8473 100644 --- a/server/testgame/TestGame/Levels/Induction/L01_Induction.lean +++ b/server/adam/Adam/Levels/Induction/L01_Induction.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Induction" Level 1 diff --git a/server/adam/Adam/Levels/Inequality.lean b/server/adam/Adam/Levels/Inequality.lean new file mode 100644 index 0000000..d136814 --- /dev/null +++ b/server/adam/Adam/Levels/Inequality.lean @@ -0,0 +1,16 @@ +import Adam.Levels.Inequality.L01_LE +import Adam.Levels.Inequality.L02_Pos +import Adam.Levels.Inequality.L03_Linarith +import Adam.Levels.Inequality.L04_Linarith + +Game "Adam" +World "Inequality" +Title "Ungleichung" + +Introduction " +Später erinnerst du dich gar nicht mehr wo und wann du diese Unterhaltung hattest, geschweige +denn mit wem. Vielleicht war es ein Traum, oder eine Erscheinung. Vielleicht war es +auch nur eines Abends über einer Runde Getränke. + +Aber auf jedenfall hast du irgendwo gelernt, was du nun weisst. +" diff --git a/server/adam/Adam/Levels/Inequality/L01_LE.lean b/server/adam/Adam/Levels/Inequality/L01_LE.lean new file mode 100644 index 0000000..eaebe8b --- /dev/null +++ b/server/adam/Adam/Levels/Inequality/L01_LE.lean @@ -0,0 +1,34 @@ +import Adam.Metadata + +Game "Adam" +World "Inequality" +Level 1 + +Title "Kleinergleich" + +Introduction +" +*(Gesrpäch)* + +**Robo** (*lallend*, oder war's fröhlich proklamierend?): +…und deshalb sind `≥` und `>` eigentlich nur Notationen für `≤`, +welches man übrigens `\\le` schreibt, was für Less-Equal (also Kleinergleich) steht… + +**Du**: Wir haben's verstanden, man benützt also Standartmässig lieber `≤` und `<`, +aber damit weiß ich eh nichts anzufangen. + +**dritte Person**: Komm schon, das kannst du ja sicher: +" + +Statement + (n m : ℕ) : m < n ↔ m.succ ≤ n := by + Hint "**Robo**: Du Narr! Das ist doch eine Kuriosität, dass `m < n` auf `ℕ` per Definition + als `m + 1 ≤ n` definiert ist! + + **dritte Person**: Du verdirbst den Witz! Ich wollte ihn doch nur testen." + rfl + +OnlyTactic rfl + +Conclusion "**Du**: Ha. ha… Na aber jetzt mal ehrlich, könnt ihr mir ein bisschen mehr +erzählen?" diff --git a/server/adam/Adam/Levels/Inequality/L02_Pos.lean b/server/adam/Adam/Levels/Inequality/L02_Pos.lean new file mode 100644 index 0000000..e328984 --- /dev/null +++ b/server/adam/Adam/Levels/Inequality/L02_Pos.lean @@ -0,0 +1,53 @@ +import Adam.Metadata + +import Mathlib.Tactic.LibrarySearch + +set_option tactic.hygienic false + +Game "Adam" +World "Inequality" +Level 2 + +Title "Kleinergleich" + +Introduction +" +*weitere Person*: …ich sag dir, eine positive Zahl kann man sowohl mit `0 < n` +als auch `n ≠ 0` darstellen. + +*Robo*: Und da gibts leider keinen Standard dazu. + +**weitere Person*: Ja und, da kann man ja einfach mit `Nat.pos_iff_ne_zero` +wechseln. Wart mal, wieso galt das nochmals… +" + +Statement Nat.pos_iff_ne_zero (n : ℕ) : 0 < n ↔ n ≠ 0 := by + Hint "**Robo** (*flüsternd*): Wenn du ein bisschen schwere Maschinerie auffahren willst, + um in zu beeindrucken, hab ich was. Mach doch eine Fallunterscheidung ob `n` Null ist + oder nicht! + + **Du** (*flüsternd*): Und wie geht das? + + **Robo** (*laut und selbstsicher*): Wir fangen mit `rcases n` an!" + rcases n + Hint "**Du**: Hmm, das muss man doch vereinfachen können. + + **Robo** (*flüsternd*): Zweiter pompöser Auftritt: sag einfach `simp` und lass das alles + automatisch geschehen." + simp + Hint "**Du**: Und hier fang ich wohl am besten an wie ich das schon kenne." + constructor + intro + simp + intro + Hint "**Robo**: Warte! Den Rest geb ich dir als Lemma: `Nat.suc_pos`." + apply Nat.succ_pos + +NewTactic simp +NewLemma Nat.succ_pos +DisabledLemma Nat.pos_iff_ne_zero + +Conclusion "**Du**: Oh `simp` ist ja echt nicht schlecht… + +Die andere Person scheint beeindruckt, hat aber gleichzeitig auch das Bedürfnis, Dich aus +der Reserve zu locken." diff --git a/server/adam/Adam/Levels/Inequality/L03_Linarith.lean b/server/adam/Adam/Levels/Inequality/L03_Linarith.lean new file mode 100644 index 0000000..bec5fdb --- /dev/null +++ b/server/adam/Adam/Levels/Inequality/L03_Linarith.lean @@ -0,0 +1,26 @@ +import Adam.Metadata +import Mathlib.Tactic.Linarith + +Game "Adam" +World "Inequality" +Level 3 + +Title "Linarith" + +Introduction +" +**dritte Person**: Nah wenn wir so spielen: +" + +Statement (n : ℕ) (h : 2 ≤ n) : n ≠ 0 := by + Hint "**Du**: `simp` geht hier nicht, was mir ja auch einläuchtet. + + **Robo**: Ist auch keine Vereinfachung, die du machen willst. Stattdessen, + `linarith` kann lineare Gleichungen und Ungleichungen lösen. Das ist das Powertool + in der hinsicht." + linarith + +NewTactic linarith +NewLemma Nat.pos_iff_ne_zero + +Conclusion "**Du**: Naja so beeindruckend war das jetzt auch noch nicht." diff --git a/server/adam/Adam/Levels/Inequality/L04_Linarith.lean b/server/adam/Adam/Levels/Inequality/L04_Linarith.lean new file mode 100644 index 0000000..0cb1618 --- /dev/null +++ b/server/adam/Adam/Levels/Inequality/L04_Linarith.lean @@ -0,0 +1,29 @@ +import Adam.Metadata +import Mathlib.Tactic.Linarith + +Game "Adam" +World "Inequality" +Level 4 + +Title "Linarith" + +Introduction +" +**Robo**: Die Taktik kann aber noch viel mehr. + +**weitere Person**: Hier, probier mal! + +$$ +\\begin{aligned} + 5 * y &\\le 35 - 2 * x \\\\ + 2 * y &\\le x + 3 +\\end{aligned} +$$ +" + +Statement (x y : ℤ) (h₂ : 5 * y ≤ 35 - 2 * x) (h₃ : 2 * y ≤ x + 3) : y ≤ 5 := by + linarith + +Conclusion "**Du**: Boah, das ist schon gar nicht schlecht. + +Und damit endet auch Deine Erinnerung und wer weiss was du anschließend gemacht hast…" diff --git a/server/testgame/TestGame/Levels/Inequality/T_Induction.lean b/server/adam/Adam/Levels/Inequality/T_Induction.lean similarity index 96% rename from server/testgame/TestGame/Levels/Inequality/T_Induction.lean rename to server/adam/Adam/Levels/Inequality/T_Induction.lean index a393275..0d0830b 100644 --- a/server/testgame/TestGame/Levels/Inequality/T_Induction.lean +++ b/server/adam/Adam/Levels/Inequality/T_Induction.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Inequality" Level 1 diff --git a/server/adam/Adam/Levels/Lean.lean b/server/adam/Adam/Levels/Lean.lean new file mode 100644 index 0000000..ff5f672 --- /dev/null +++ b/server/adam/Adam/Levels/Lean.lean @@ -0,0 +1,26 @@ +import Adam.Levels.Lean.L01_Type +import Adam.Levels.Lean.L02_Universe +import Adam.Levels.Lean.L03_ImplicitArguments +import Adam.Levels.Lean.L04_InstanceArguments + +Game "Adam" +World "Lean" +Title "Lean" + +Introduction +"Während ihr weiter durch Täler, über Geröllhalden und zwischen monumentalen Steintürmen +umherzieht, fragst Du eines Tages Robo. + +**Du**: Sag mal, hast du dir je Gedanken dazu gemacht, wie du eigentlich funktionierts? + +**Robo**: Was meinst du, wie ich funktioniere? Ich bin halt… ich… + +**Du**: Ja schon, aber was woher weisst du denn alles was du weisst? + +**Robo**: Das kann ich dir sagen. Früher habe ich viele Datenträger verschlungen, +und dadurch gelernt. + +**Du**: Ob so eine Diskette wohl lecker schmeckt? Egal, ich hab ein paar Fragen zu deinem +Lean-Modul. + +**Robo**: Na dann nur zu!" diff --git a/server/adam/Adam/Levels/Lean/L01_Type.lean b/server/adam/Adam/Levels/Lean/L01_Type.lean new file mode 100644 index 0000000..eb4a62d --- /dev/null +++ b/server/adam/Adam/Levels/Lean/L01_Type.lean @@ -0,0 +1,41 @@ +import Adam.Metadata + +import Mathlib + +set_option tactic.hygienic false + +Game "Adam" +World "Lean" +Level 1 + +Title "Typen" + +Introduction +" +**Du**: Also, wieso schreib ich denn sowohl `(n : ℕ)` für eine natürliche Zahl wie +auch `(h : A ∧ ¬ B)` für eine Aussage? + +**Robo**: Alles in Lean sind Objekte von einem *Typen*, man nennt das auch +\"dependent type theory\". Rechts vom `:` steht immer der Typ der dieses Objekt hat. + +**Du**: Verstehe, dann war `ℕ` der Typ der natürlichen Zahlen, `Prop` der Typ +aller logischen Aussagen, und so weiter. Un wenn `R` einfach irgendein Typ ist, dann… + +**Robot: …würdest du das als `(R : Type)` schreiben. + +**Du**: Also sind Typen ein bisschen jene Grundlage, die in meinem Studium die +Mengen eingenommen haben? + +**Robo**: Genau. Ein Ring ist dann zum Beispiel als `(R : Type) [Ring R]` definiert, +also als Typen, auf dem eine Ringstruktur besteht. + +**Robo**: Hier ein Beispiel. Die Taktik `ring` funktioniert in jedem Typen, der +genügend Struktur definiert hat, zum Beispiel in einem kommutativen Ring: +" + +Statement (R : Type) [CommRing R] (a b : R) : a + b = b + a := by + ring + +Conclusion "**Robo**: `[CommRing R]` nennt man übrigens eine Instanz und die +eckigen Klammern sagen Lean, dass es automatisch suchen soll, ob es so eine Instanz +findet, wenn man ein Lemma anwenden will." diff --git a/server/adam/Adam/Levels/Lean/L02_Universe.lean b/server/adam/Adam/Levels/Lean/L02_Universe.lean new file mode 100644 index 0000000..c20c171 --- /dev/null +++ b/server/adam/Adam/Levels/Lean/L02_Universe.lean @@ -0,0 +1,44 @@ +import Adam.Metadata + +import Mathlib + +set_option tactic.hygienic false + +Game "Adam" +World "Lean" +Level 2 + +Title "Universen" + +Introduction +"**Du**: Aber wenn alles Typen sind, welcher Typ hat dann `Type`? + +**Robo**: `Type 1` und dieser hat Typ `Type 2`, etc. + +**Robo**: Die Zahl nennt man *Universum*. Manchmal führt man Universen explizit +mit `universum u` ein, öfter siehst du `(R : Type _)`, was einfach ein Platzhalter +für irgend ein Universum ist. + +**Du**: Das klingt ein bisschen nach Mengentheoretische Probleme, die man normalerweise +ignoriert. + +**Robo**: Genau! Deshalb schreibt man eigentlich immer einfach `Type _` und ist glücklich. +Spezifischer muss man erst werden wenn man sowas wie Kategorientheorie anschaut, wo +man die Universen tatsächlich kontrollieren muss. + +**Du**: Oke, hier rein, da raus. Aber hast du mir noch eine Aufgabe? +" + +universe u + +Statement + (R : Type u) [CommRing R] (a b : R) : a + b = b + a := by + Hint "**Robo**: Naja, Aufgaben zu Universen sind nicht so natürlich, + aber vorige Aufgabe würde man eigentlich besser so schreiben, da + kannst du mindestens das Uniersum beobachten." + ring + +Conclusion "**Du**: Na dann. Aber gut dass ich's mal gesehen hab." + +-- Hint (R : Type) (h : CommRing R) (a : R) (b : R) : a + b = b + a => +-- "" diff --git a/server/adam/Adam/Levels/Lean/L03_ImplicitArguments.lean b/server/adam/Adam/Levels/Lean/L03_ImplicitArguments.lean new file mode 100644 index 0000000..19a8411 --- /dev/null +++ b/server/adam/Adam/Levels/Lean/L03_ImplicitArguments.lean @@ -0,0 +1,71 @@ +import Adam.Metadata + +import Mathlib +import Adam.ToBePorted + +set_option tactic.hygienic false + +Game "Adam" +World "Lean" +Level 3 + +Title "Implizite Argumente" + +Introduction +" +**Du**: Was mich aber mehr beschäftigt, ist, dass Lemmas manchmal viel mehr Argumente +haben als ich hinschreiben muss. + +**Robo**: Lean kann manche Argumente aus dem Kontext erschliessen. Hast du zum Beispiel +ein Lemma von vorhin + +``` +lemma Fin.sum_univ_castSucc {β : Type _} [AddCommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) : + ∑ i : Fin (n + 1), f i = ∑ i : Fin n, f (↑Fin.castSucc.toEmbedding i) + f (Fin.last n) := by + sorry +``` + +dann reicht es ja Lean `f` zu geben und daraus kann es herausfinden, was die anderen +(`β`, `n`) sein müssen. + +**Robo**: Solche *implizite Argumente* markiert man dann mit `{_ : _}` während +*explizite Arumente* mit `(_ : _)` markiert werden. + +**Du**: Dann könnte ich also einfach `Fin.sum_univ_castSucc f` schreiben? + +**Robo**: Genau! + +**Du**: Und was war dann das `(n := m + 1)` vorhin genau? + +**Robo**: Damit kann man im Aussnahmefall die impliziten Argumente doch angeben. Hier haben wir +gesagt, es soll für das Argument `n` den Term `m + 1` einsetzen. Hier mach das doch noch einmal +unter weniger Stress: +" + +open BigOperators + +Statement (m : ℕ) : ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i := by + Branch + rw [Fin.sum_univ_castSucc] + Hint "**Robo**: Siehst du, ohne die Hilfe macht es das Falsche. Deshalb muss man hier + explizit mit `Fin.sum_univ_castSucc (n := m + 1)` nachhelfen." + rw [Fin.sum_univ_castSucc] + Hint "**Robo**: Na klar, in dem Beispiel kannst du einfach weiter umschreiben bis es + nicht mehr geht, aber das war nicht der Punkt…" + rw [Fin.sum_univ_castSucc] + Hint "**Robo**: Na klar, in dem Beispiel kannst du einfach weiter umschreiben bis es + nicht mehr geht, aber das war nicht der Punkt…" + rfl + rw [Fin.sum_univ_castSucc (n := m + 1)] + rfl + +OnlyTactic rw rfl + +Conclusion "**Du**: Gibt es auch noch ander Methoden implizite Argumente anzugeben. + +**Robo** `@Fin.sum_univ_castSucc` würde *alle* Argumente explizit machen, +aber das ist unparktischer, weil man dann irgendwie +`@Fin.sum_univ_castSucc _ _ (m + 1)` schreiben müsste. + +**Du**: Ah und ich sehe der `_` ist überall in Lean ein Platzhalter, der automatisch +gefüllt wird." diff --git a/server/adam/Adam/Levels/Lean/L04_InstanceArguments.lean b/server/adam/Adam/Levels/Lean/L04_InstanceArguments.lean new file mode 100644 index 0000000..dbb5425 --- /dev/null +++ b/server/adam/Adam/Levels/Lean/L04_InstanceArguments.lean @@ -0,0 +1,57 @@ +import Adam.Metadata + +import Mathlib +import Adam.ToBePorted + +set_option tactic.hygienic false + +Game "Adam" +World "Lean" +Level 4 + +Title "Instanz-Argumente" + +Introduction +"**Du**: Also nochmals als Zusammenfassung, dann gibt es 3 Arten von Argumenten, +explizite mit `()`, implizite mit `{}` und Instanzen mit `[]`? + +**Robo**: Korrekt. Instanzen sind damit auch Implizite Argumente. Der Unterschied +zwischen `{}` und `[]` ist also *wie* Lean diese füllt. + +**Du**: Verstehe, bei den ersten sucht es logisch nach einer richtigen Möglichkeit, +beim zweiten geht's durch alle Instanzen, die es kennt. + + +**Robo**: Funktioniert hier bei mir nicht, aber wenn du ausserhalb eines Beweises +`#synth Ring ℤ` in ein Dokument schreibt, zeigt dir Lean, ob es eine Instanz finden kann. + +**Du**: Ich glaube das macht alles Sinn. + +**Robo**: Hier, mach nochmals das Gleiche wie vorhin aber mit @-Syntax um das zu +verinnerlichen: +" + +open BigOperators + +Statement (m : ℕ) : + ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i := by + Hint "*Robo*: Schreibe `rw [@Fin.sum_univ_castSucc _ _ (m + 1)]` + anstatt `rw [Fin.sum_univ_castSucc (n := m + 1)]`!" + rw [@Fin.sum_univ_castSucc _ _ (m + 1)] + rfl + +OnlyTactic rw rfl + +Conclusion " +**Du**: Danke Robo! + +Um zwei weitere Ecken und plötzlich steht ihr wieder vor dem Golem, dem ihr schon begegnet seit. +Dieser lädt euch zum Abendmahl ein. Ihr erfährt, dass er ganz gerne liest und er zeigt euch +sein neustes Buch, das er leider nicht lesen kann. Nich tnur ist es der zweite Band einer Serie +(der Erste hat offensichtlich was mit \"Urbildern\" zu tun), sondern ist es auch in einem +Dialekt geschrieben, der anscheinend nur auf einem Nachbarsmond gesprochen wird. + +Ihr beschliesst dem herzlichen Golem zu helfen und beiden Monden einen Besuch abzustatten, +sowohl um den Dialekt zu lernen, wie auch in der Bibliothek auf dem anderen Mond nach dem +ersten Band zu suchen. +" diff --git a/server/testgame/TestGame/Levels/LeftOvers/L09_Or.lean b/server/adam/Adam/Levels/LeftOvers/L09_Or.lean similarity index 98% rename from server/testgame/TestGame/Levels/LeftOvers/L09_Or.lean rename to server/adam/Adam/Levels/LeftOvers/L09_Or.lean index 24297d5..b572c8a 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/L09_Or.lean +++ b/server/adam/Adam/Levels/LeftOvers/L09_Or.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Implication" Level 9 diff --git a/server/testgame/TestGame/Levels/LeftOvers/L33_Prime.lean b/server/adam/Adam/Levels/LeftOvers/L33_Prime.lean similarity index 80% rename from server/testgame/TestGame/Levels/LeftOvers/L33_Prime.lean rename to server/adam/Adam/Levels/LeftOvers/L33_Prime.lean index 1b8393f..419f94a 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/L33_Prime.lean +++ b/server/adam/Adam/Levels/LeftOvers/L33_Prime.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "Nat2" Level 3 diff --git a/server/testgame/TestGame/Levels/LeftOvers/L34_ExistsUnique.lean b/server/adam/Adam/Levels/LeftOvers/L34_ExistsUnique.lean similarity index 83% rename from server/testgame/TestGame/Levels/LeftOvers/L34_ExistsUnique.lean rename to server/adam/Adam/Levels/LeftOvers/L34_ExistsUnique.lean index 9abc351..49188d0 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/L34_ExistsUnique.lean +++ b/server/adam/Adam/Levels/LeftOvers/L34_ExistsUnique.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "Nat2" Level 5 diff --git a/server/testgame/TestGame/Levels/LeftOvers/Lxx_Prime.lean b/server/adam/Adam/Levels/LeftOvers/Lxx_Prime.lean similarity index 97% rename from server/testgame/TestGame/Levels/LeftOvers/Lxx_Prime.lean rename to server/adam/Adam/Levels/LeftOvers/Lxx_Prime.lean index be43277..f1847f8 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/Lxx_Prime.lean +++ b/server/adam/Adam/Levels/LeftOvers/Lxx_Prime.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use @@ -21,7 +21,7 @@ lemma even_square (n : ℕ) : even n → even (n ^ 2) := by def prime (n : ℕ) : Prop := (2 ≤ n) ∧ ∀ a b, n = a * b → a = 1 ∨ b = 1 -Game "TestGame" +Game "Adam" World "Nat" Level 4 diff --git a/server/testgame/TestGame/Levels/LeftOvers/Lxx_Tauto.lean b/server/adam/Adam/Levels/LeftOvers/Lxx_Tauto.lean similarity index 100% rename from server/testgame/TestGame/Levels/LeftOvers/Lxx_Tauto.lean rename to server/adam/Adam/Levels/LeftOvers/Lxx_Tauto.lean diff --git a/server/testgame/TestGame/Levels/LeftOvers/Lxx_Tfae.lean b/server/adam/Adam/Levels/LeftOvers/Lxx_Tfae.lean similarity index 100% rename from server/testgame/TestGame/Levels/LeftOvers/Lxx_Tfae.lean rename to server/adam/Adam/Levels/LeftOvers/Lxx_Tfae.lean diff --git a/server/testgame/TestGame/Levels/LeftOvers/Playground.lean b/server/adam/Adam/Levels/LeftOvers/Playground.lean similarity index 92% rename from server/testgame/TestGame/Levels/LeftOvers/Playground.lean rename to server/adam/Adam/Levels/LeftOvers/Playground.lean index 7622e0b..b1f5e6a 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/Playground.lean +++ b/server/adam/Adam/Levels/LeftOvers/Playground.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -- -- INCORPORATED diff --git a/server/testgame/TestGame/Levels/LeftOvers/xx_Functions.lean b/server/adam/Adam/Levels/LeftOvers/xx_Functions.lean similarity index 91% rename from server/testgame/TestGame/Levels/LeftOvers/xx_Functions.lean rename to server/adam/Adam/Levels/LeftOvers/xx_Functions.lean index 061d9a7..87d457f 100644 --- a/server/testgame/TestGame/Levels/LeftOvers/xx_Functions.lean +++ b/server/adam/Adam/Levels/LeftOvers/xx_Functions.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "Function" Level 1 diff --git a/server/adam/Adam/Levels/LinearAlgebra.lean b/server/adam/Adam/Levels/LinearAlgebra.lean new file mode 100644 index 0000000..0bb386d --- /dev/null +++ b/server/adam/Adam/Levels/LinearAlgebra.lean @@ -0,0 +1,41 @@ +import Adam.Levels.LinearAlgebra.L01_Module +import Adam.Levels.LinearAlgebra.L02_VectorNotation +import Adam.Levels.LinearAlgebra.L03_VectorNotation +import Adam.Levels.LinearAlgebra.L04_Submodule +import Adam.Levels.LinearAlgebra.L05_Submodule +import Adam.Levels.LinearAlgebra.L06_Span +import Adam.Levels.LinearAlgebra.L07_Span +import Adam.Levels.LinearAlgebra.L08_GeneratingSet + +import Adam.Levels.LinearAlgebra.M01_LinearMap +import Adam.Levels.LinearAlgebra.M02_LinearIndep +import Adam.Levels.LinearAlgebra.M04_Basis + +import Adam.Levels.LinearAlgebra.N01_Span +import Adam.Levels.LinearAlgebra.N02_Span +import Adam.Levels.LinearAlgebra.N03_Idempotent +import Adam.Levels.LinearAlgebra.N04_Idempotent +import Adam.Levels.LinearAlgebra.N05_Sum +import Adam.Levels.LinearAlgebra.N06_Sum +import Adam.Levels.LinearAlgebra.N07_Prod +import Adam.Levels.LinearAlgebra.N08_Prod +import Adam.Levels.LinearAlgebra.N09_Prod + +Game "Adam" +World "Module" +Title "Vektorraum" + +Introduction "Hier lernst du die Grundlagen zur linearen Algebra. + +Vektorräume sind in Lean etwas algemeiner definiert als dies normalerweise in +einer Einführungsvorlesung antrifft: Man definiert ein \"Modul\" (Plural: Moduln) +über einem Ring. Ein Modul über einem *Körper* wird dann auch \"Vektorraum\" genannt. +" + +Game "Adam" +World "Basis" +Title "Lineare Abbildungen" + +Game "Adam" +World "Module2" +Title "Mehr Vektorräume" diff --git a/server/adam/Adam/Levels/LinearAlgebra/L01_Module.lean b/server/adam/Adam/Levels/LinearAlgebra/L01_Module.lean new file mode 100644 index 0000000..d1866ec --- /dev/null +++ b/server/adam/Adam/Levels/LinearAlgebra/L01_Module.lean @@ -0,0 +1,106 @@ +import Adam.Metadata + +import Mathlib.Data.Real.Basic -- definiert `ℝ` +import Mathlib.Algebra.Module.Basic -- definiert `module` +import Mathlib.Tactic.LibrarySearch +import Adam.StructInstWithHoles + +set_option tactic.hygienic false + +Game "Adam" +World "Module" +Level 1 + +Title "Module" + +Introduction +" +Konkret heisst das: + +Sei `R` ein Ring. Ein `R`-Modul ist eine kommutative Gruppe `(V, +)` zusammen mit +einer Abbildung `• : R × V → V` (Skalarmultiplitation genannt), die folgende +Eigenschaften beliebige `(r s : R)` und `(v w : V)`erfüllt: +- `r • (v + w) = r • v + r • w` +- `(r + s) • v = r • v + s • v` +- `(r * s) • v = r • s • v` +- `1 • r = r` +- `0 • v = 0` +- `r • 0 = 0` + +" + +-- Bemerkungen: +-- 1) Über einem `[field R]` sind die letzten beiden Eigenschaften überflüssig, diese kann +-- man beweisen, wenn man Cancellation (`a₁ + x = a₂ + x → a₁ = a₂`) hat. In einem generellen +-- Ring, muss das aber nicht gegeben sein (siehe Nullteiler). +-- 2) Die nötigen Annahmen um ein Modul in Lean zu erhalten sind tatsächlich noch etwas lockerer, +-- so muss `R` nicht ganz ein Ring sein (nur `[Semiring R]`) und +-- `V` muss nicht ganz eine kommutative Gruppe sein (nur `[add_comm_monoid V]`). +-- Einen abstrakten Vektorraum definiert man wie folgt: +-- `variables {R V : Type*} [field R] [add_comm_monoid V] [module R V]` + +-- Wenn man hingegen konkret zeigen will, dass ein existierendes Objekt ein Vektorraum ist, +-- kann man eine einsprechende Instanz wie folgt definieren: + +-- ``` +-- instance Q_module : Module ℚ ℝ := +-- { smul := λa r, ↑a * r +-- smul_zero := _ +-- zero_smul := _ +-- one_smul := _ +-- smul_add := _ +-- add_smul := _ +-- mul_smul := _ } +-- ``` +-- Man muss also angeben, welche Skalarmultiplikation man gerne hätte +-- (`smul`. In unserem Fall sagen wir einfach, diese soll Multiplikation in `ℝ` sein.) +-- und dazu jegliche Beweise, dass die Skalarmultiplikation sich mit der Ringstruktur verträgt. +-- Im nachfolgenden beweisen wir die Eigenschaften einzeln. + +Statement +"Zeige, dass $\\mathbb{R}$ ein $\\mathbb{Q}$-Modul ist." + : Module ℚ ℝ := by + Hint "**Robo**: Als erstes willst du die Stuktur `Modul` aufteilen in einzelne Beweise. + Der Syntax dafür ist: + + ``` + refine \{ ?..! } + ``` + " + refine { ?..! } + · Hint "**Robo**: Hier musst du die Skalarmultiplikation angeben. + Benutze dafür `exact fun (a : ℚ) (r : ℝ) => ↑a * r`." + exact fun (a : ℚ) (r : ℝ) => ↑a * r + · Hint "**Robo**: Jetzt musst du alle eigenschaften eines $\\mathbb\{Q}$-Moduls zeigen, + das sind also 6 einzelne Goals." + intro b + Hint "**Robo**: Mit `change (1 : ℚ) * {b} = {b}` kannst du das Goal umschreiben, damit + dann andere Taktiken besser damit arbeiten können." + change (1 : ℚ) * b = b + Hint "**Robo**: Den Teil kannst du mit `simp` beweisen." + simp + · intro x y b + Hint "**Robo**: Benutze `change` um `•` durch `*` zu ersetzen." + Hint (hidden := true) "**Robo**: Explizit `change ({x} * {y} : ℚ) * {b} = {x} * ({y} * {b})`" + change (x * y : ℚ) * b = x * (y * b) + Hint "**Robo**: Mit `simp` und `ring` kannst du den Rest beweisen." + simp + ring + · intro a + simp + · intro a x y + Hint (hidden := true) "**Robo**: Explizit `change {a} * ({x} + {y}) = {a} * {x} + {a} * {y}`" + change a * (x + y) = a * x + a * y + ring + · intro r s x + Hint (hidden := true) "**Robo**: Explizit + `change ({r} + {s} : ℚ) * {x} = {r} * {x} + {s} * {x}`" + change (r + s : ℚ) * x = r * x + s * x + simp + ring + · intro a + Hint (hidden := true) "**Robo**: Explizit `change (0 : ℚ) * {a} = 0`" + change (0 : ℚ) * a = 0 + simp + +NewTactic refine exact change diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L02_VectorNotation.lean b/server/adam/Adam/Levels/LinearAlgebra/L02_VectorNotation.lean similarity index 55% rename from server/testgame/TestGame/Levels/LinearAlgebra/L02_VectorNotation.lean rename to server/adam/Adam/Levels/LinearAlgebra/L02_VectorNotation.lean index 0e77ca7..c0b6be3 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L02_VectorNotation.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L02_VectorNotation.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Real.Basic -- definiert `ℝ` import Mathlib.Algebra.Module.Pi -- definiert `Module ℚ (fin 2 → ℚ)` @@ -7,7 +7,7 @@ import Mathlib.Tactic.FinCases set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Module" Level 2 @@ -15,30 +15,14 @@ Title "Konkrete Vektorräume" Introduction " -Häufig in der linearen Algebra hat man ganz einfach Vektoren über `ℚ` oder `ℝ` -und möchte diese explizit definieren. - -Reele Vektorräume definiert man in Lean am besten als Funktion von einem Indexset. - -So ist `Fin 2` eine Menge, die nur `0` und `1` enthält -und `ℚ²` wird als `Fin 2 → ℚ` definiert. Hier machen wir uns eine -lokale notation dafür: +Den $\\mathbb{Q}$-Vektorraum $\\mathbb{Q}^3$ definiert man am besten mit +der lokalen Notation ``` -notation `ℚ²` := Fin 2 → ℚ +local notation `ℚ³` := Fin 3 → ℚ ``` -Das mag auf den ersten Blick etwas unintuitiv erscheinen, hat aber den Vorteil, -dass man die ganze -Infrastruktur für Funktionen einfach direkt für Vektoren und -Matrizen mitgebrauchen kann. - -Wir können uns auch noch ein paar andere standardmässige `ℚ`-Vektorräume definieren. - -``` -notation \"ℚ³\" => Fin 3 → ℚ -notation \"ℚ^(\" n \")\" => (Fin n) → ℚ -``` +Dabei ist `Fin 3` die Indexmenge $\\{0, 1, 2\\}$. Die schreibweise für einen Vektor ist `![ _, _ ]`. Zu beachten ist, dass man bei Zahlen explizit einen Typ angeben muss, sonst denkt sich @@ -61,8 +45,8 @@ Dann eine Vektorgleichung komponentenweise aufteilt. Für jede Komponente kann man dann mit `simp` und `ring` weiterkommen. " -notation "ℚ³" => Fin 3 → ℚ -notation "ℚ^(" n ")" => (Fin n) → ℚ +local notation "ℚ³" => Fin 3 → ℚ +local notation "ℚ^(" n ")" => (Fin n) → ℚ Statement "" diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L03_VectorNotation.lean b/server/adam/Adam/Levels/LinearAlgebra/L03_VectorNotation.lean similarity index 92% rename from server/testgame/TestGame/Levels/LinearAlgebra/L03_VectorNotation.lean rename to server/adam/Adam/Levels/LinearAlgebra/L03_VectorNotation.lean index 839bd94..b49b982 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L03_VectorNotation.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L03_VectorNotation.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Real.Basic -- definiert `ℝ` import Mathlib.Algebra.Module.Pi -- definiert `Module ℚ (fin 2 → ℚ)` import Mathlib.Data.Fin.VecNotation import Mathlib.Tactic.FinCases -Game "TestGame" +Game "Adam" World "Module" Level 3 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L04_Submodule.lean b/server/adam/Adam/Levels/LinearAlgebra/L04_Submodule.lean similarity index 97% rename from server/testgame/TestGame/Levels/LinearAlgebra/L04_Submodule.lean rename to server/adam/Adam/Levels/LinearAlgebra/L04_Submodule.lean index 42667d3..964e47a 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L04_Submodule.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L04_Submodule.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice -Game "TestGame" +Game "Adam" World "Module" Level 4 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L05_Submodule.lean b/server/adam/Adam/Levels/LinearAlgebra/L05_Submodule.lean similarity index 92% rename from server/testgame/TestGame/Levels/LinearAlgebra/L05_Submodule.lean rename to server/adam/Adam/Levels/LinearAlgebra/L05_Submodule.lean index 860a2aa..6709165 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L05_Submodule.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L05_Submodule.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice -Game "TestGame" +Game "Adam" World "Module" Level 5 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L06_Span.lean b/server/adam/Adam/Levels/LinearAlgebra/L06_Span.lean similarity index 96% rename from server/testgame/TestGame/Levels/LinearAlgebra/L06_Span.lean rename to server/adam/Adam/Levels/LinearAlgebra/L06_Span.lean index ae9b8ab..8d309d0 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L06_Span.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L06_Span.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic -- definiert `ℝ` @@ -8,7 +8,7 @@ import Mathlib.Tactic.FinCases import Mathlib.Algebra.BigOperators.Finsupp -- default? import Mathlib.LinearAlgebra.Span -Game "TestGame" +Game "Adam" World "Module" Level 6 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L07_Span.lean b/server/adam/Adam/Levels/LinearAlgebra/L07_Span.lean similarity index 96% rename from server/testgame/TestGame/Levels/LinearAlgebra/L07_Span.lean rename to server/adam/Adam/Levels/LinearAlgebra/L07_Span.lean index f047823..a50946b 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L07_Span.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L07_Span.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic -- definiert `ℝ` @@ -10,7 +10,7 @@ import Mathlib.LinearAlgebra.Span import Mathlib.Tactic.LibrarySearch import Mathlib -Game "TestGame" +Game "Adam" World "Module" Level 7 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L08_GeneratingSet.lean b/server/adam/Adam/Levels/LinearAlgebra/L08_GeneratingSet.lean similarity index 96% rename from server/testgame/TestGame/Levels/LinearAlgebra/L08_GeneratingSet.lean rename to server/adam/Adam/Levels/LinearAlgebra/L08_GeneratingSet.lean index 32bc7bd..9d20601 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L08_GeneratingSet.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/L08_GeneratingSet.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic -- definiert `ℝ` @@ -8,7 +8,7 @@ import Mathlib.Tactic.FinCases import Mathlib.Algebra.BigOperators.Finsupp -- default? import Mathlib.LinearAlgebra.Span -Game "TestGame" +Game "Adam" World "Module" Level 8 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/M01_LinearMap.lean b/server/adam/Adam/Levels/LinearAlgebra/M01_LinearMap.lean similarity index 98% rename from server/testgame/TestGame/Levels/LinearAlgebra/M01_LinearMap.lean rename to server/adam/Adam/Levels/LinearAlgebra/M01_LinearMap.lean index bf6d590..258e0d4 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/M01_LinearMap.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/M01_LinearMap.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Real.Basic -- definiert `ℝ` import Mathlib.Algebra.Module.LinearMap -- definiert `→ₗ` import Mathlib.Tactic.FinCases import Mathlib.Data.Fin.VecNotation -Game "TestGame" +Game "Adam" World "Basis" Level 1 diff --git a/server/adam/Adam/Levels/LinearAlgebra/M02_LinearIndep.lean b/server/adam/Adam/Levels/LinearAlgebra/M02_LinearIndep.lean new file mode 100644 index 0000000..359fe45 --- /dev/null +++ b/server/adam/Adam/Levels/LinearAlgebra/M02_LinearIndep.lean @@ -0,0 +1,49 @@ +import Adam.Metadata + +import Mathlib.Algebra.Module.Submodule.Lattice +import Mathlib.Data.Real.Basic -- definiert `ℝ` +import Mathlib.Algebra.Module.LinearMap -- definiert `→ₗ` +import Mathlib.Tactic.FinCases +import Mathlib.Data.Fin.VecNotation +-- import Mathlib.LinearAlgebra.Finsupp +import Mathlib.Algebra.BigOperators.Basic -- default +-- import Mathlib.LinearAlgebra.LinearIndependent +import Mathlib + +Game "Adam" +World "Basis" +Level 2 + +Title "Lineare Unabhängigkeit" + +namespace Ex_LinIndep + +scoped notation "ℝ²" => Fin 2 → ℝ + +Introduction +" +" + +Statement +"Zeige, dass `![1, 0], ![1, 1]` linear unabhängig über `ℝ` sind." + : LinearIndependent ℝ ![(![1, 0] : ℝ²), ![1, 1]] := by + Hint "`rw [Fintype.linearIndependent_iff]`" + rw [Fintype.linearIndependent_iff] + Hint "`intros c h`" + intros c h + Hint "BUG: `simp at h` does not work :(" + simp at h -- doesn't work + sorry + + -- rw [Fintype.linearIndependent_iff] + -- intros c h + -- simp at h + -- intros i + -- fin_cases i + -- swap + -- { exact h.2 } + -- { have h' := h.1 + -- rw [h.2, add_zero] at h' + -- exact h'} + +end Ex_LinIndep diff --git a/server/adam/Adam/Levels/LinearAlgebra/M04_Basis.lean b/server/adam/Adam/Levels/LinearAlgebra/M04_Basis.lean new file mode 100644 index 0000000..c8145e1 --- /dev/null +++ b/server/adam/Adam/Levels/LinearAlgebra/M04_Basis.lean @@ -0,0 +1,32 @@ +import Adam.Metadata + +import Mathlib.Algebra.Module.Submodule.Lattice +import Mathlib + +Game "Adam" +World "Basis" +Level 4 + +Title "Basis" + +namespace Ex_Basis + +scoped notation "ℝ²" => Fin 2 → ℝ + +open Submodule + +Introduction +" + +" + +lemma exercise1 : LinearIndependent ℝ ![(![1, 0] : ℝ²), ![1, 1]] := sorry + +lemma exercise2 : ⊤ ≤ span ℝ (Set.range ![(![1, 0] : Fin 2 → ℝ), ![1, 1]]) := sorry + +Statement : Basis (Fin 2) ℝ ℝ² := by + apply Basis.mk + apply exercise1 + apply exercise2 + +end Ex_Basis diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N01_Span.lean b/server/adam/Adam/Levels/LinearAlgebra/N01_Span.lean similarity index 94% rename from server/testgame/TestGame/Levels/LinearAlgebra/N01_Span.lean rename to server/adam/Adam/Levels/LinearAlgebra/N01_Span.lean index b8d587a..c9d4aaf 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N01_Span.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N01_Span.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic -- definiert `ℝ` @@ -8,7 +8,7 @@ import Mathlib.Tactic.FinCases import Mathlib.Algebra.BigOperators.Finsupp -- default? import Mathlib.LinearAlgebra.Span -Game "TestGame" +Game "Adam" World "Module2" Level 1 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N02_Span.lean b/server/adam/Adam/Levels/LinearAlgebra/N02_Span.lean similarity index 96% rename from server/testgame/TestGame/Levels/LinearAlgebra/N02_Span.lean rename to server/adam/Adam/Levels/LinearAlgebra/N02_Span.lean index 8d2e82c..decc953 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N02_Span.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N02_Span.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic -- definiert `ℝ` @@ -11,7 +11,7 @@ import Mathlib open Submodule -Game "TestGame" +Game "Adam" World "Module2" Level 2 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N03_Idempotent.lean b/server/adam/Adam/Levels/LinearAlgebra/N03_Idempotent.lean similarity index 94% rename from server/testgame/TestGame/Levels/LinearAlgebra/N03_Idempotent.lean rename to server/adam/Adam/Levels/LinearAlgebra/N03_Idempotent.lean index 02cf3b4..ceb7558 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N03_Idempotent.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N03_Idempotent.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic import Mathlib.LinearAlgebra.Basic -Game "TestGame" +Game "Adam" World "Module2" Level 3 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N04_Idempotent.lean b/server/adam/Adam/Levels/LinearAlgebra/N04_Idempotent.lean similarity index 93% rename from server/testgame/TestGame/Levels/LinearAlgebra/N04_Idempotent.lean rename to server/adam/Adam/Levels/LinearAlgebra/N04_Idempotent.lean index 26a956d..fecaebb 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N04_Idempotent.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N04_Idempotent.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic import Mathlib.LinearAlgebra.Basic -Game "TestGame" +Game "Adam" World "Module2" Level 4 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N05_Sum.lean b/server/adam/Adam/Levels/LinearAlgebra/N05_Sum.lean similarity index 92% rename from server/testgame/TestGame/Levels/LinearAlgebra/N05_Sum.lean rename to server/adam/Adam/Levels/LinearAlgebra/N05_Sum.lean index 0490708..18ad88c 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N05_Sum.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N05_Sum.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.LinearAlgebra.Span open Submodule -Game "TestGame" +Game "Adam" World "Module2" Level 5 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N06_Sum.lean b/server/adam/Adam/Levels/LinearAlgebra/N06_Sum.lean similarity index 92% rename from server/testgame/TestGame/Levels/LinearAlgebra/N06_Sum.lean rename to server/adam/Adam/Levels/LinearAlgebra/N06_Sum.lean index a4655c3..d571449 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N06_Sum.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N06_Sum.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.LinearAlgebra.Span open Submodule -Game "TestGame" +Game "Adam" World "Module2" Level 6 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N07_Prod.lean b/server/adam/Adam/Levels/LinearAlgebra/N07_Prod.lean similarity index 96% rename from server/testgame/TestGame/Levels/LinearAlgebra/N07_Prod.lean rename to server/adam/Adam/Levels/LinearAlgebra/N07_Prod.lean index 606d3c5..ff1f973 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N07_Prod.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N07_Prod.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic import Mathlib.LinearAlgebra.Span -Game "TestGame" +Game "Adam" World "Module2" Level 7 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N08_Prod.lean b/server/adam/Adam/Levels/LinearAlgebra/N08_Prod.lean similarity index 97% rename from server/testgame/TestGame/Levels/LinearAlgebra/N08_Prod.lean rename to server/adam/Adam/Levels/LinearAlgebra/N08_Prod.lean index 853c9dd..3dcc9a0 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N08_Prod.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N08_Prod.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic @@ -6,7 +6,7 @@ import Mathlib.LinearAlgebra.Span universe u -Game "TestGame" +Game "Adam" World "Module2" Level 8 diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/N09_Prod.lean b/server/adam/Adam/Levels/LinearAlgebra/N09_Prod.lean similarity index 97% rename from server/testgame/TestGame/Levels/LinearAlgebra/N09_Prod.lean rename to server/adam/Adam/Levels/LinearAlgebra/N09_Prod.lean index 0764a87..5b08aa3 100644 --- a/server/testgame/TestGame/Levels/LinearAlgebra/N09_Prod.lean +++ b/server/adam/Adam/Levels/LinearAlgebra/N09_Prod.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Algebra.Module.Submodule.Lattice import Mathlib.Data.Real.Basic import Mathlib.LinearAlgebra.Span -Game "TestGame" +Game "Adam" World "Module2" Level 9 diff --git a/server/testgame/TestGame/Levels/Notes.txt b/server/adam/Adam/Levels/Notes.txt similarity index 100% rename from server/testgame/TestGame/Levels/Notes.txt rename to server/adam/Adam/Levels/Notes.txt diff --git a/server/adam/Adam/Levels/Numbers.lean b/server/adam/Adam/Levels/Numbers.lean new file mode 100644 index 0000000..6a6f2fa --- /dev/null +++ b/server/adam/Adam/Levels/Numbers.lean @@ -0,0 +1,2 @@ +import Adam.Levels.Numbers.L01_PNat +import Adam.Levels.Numbers.L02_PNat diff --git a/server/testgame/TestGame/Levels/Numbers/L01_PNat.lean b/server/adam/Adam/Levels/Numbers/L01_PNat.lean similarity index 97% rename from server/testgame/TestGame/Levels/Numbers/L01_PNat.lean rename to server/adam/Adam/Levels/Numbers/L01_PNat.lean index fa1a217..d45f07a 100644 --- a/server/testgame/TestGame/Levels/Numbers/L01_PNat.lean +++ b/server/adam/Adam/Levels/Numbers/L01_PNat.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Numbers" Level 1 diff --git a/server/testgame/TestGame/Levels/Numbers/L02_PNat.lean b/server/adam/Adam/Levels/Numbers/L02_PNat.lean similarity index 89% rename from server/testgame/TestGame/Levels/Numbers/L02_PNat.lean rename to server/adam/Adam/Levels/Numbers/L02_PNat.lean index bca2e8f..b073a3c 100644 --- a/server/testgame/TestGame/Levels/Numbers/L02_PNat.lean +++ b/server/adam/Adam/Levels/Numbers/L02_PNat.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Numbers" Level 2 diff --git a/server/testgame/TestGame/Levels/Predicate.lean b/server/adam/Adam/Levels/Predicate.lean similarity index 65% rename from server/testgame/TestGame/Levels/Predicate.lean rename to server/adam/Adam/Levels/Predicate.lean index d5c4135..de8b91a 100644 --- a/server/testgame/TestGame/Levels/Predicate.lean +++ b/server/adam/Adam/Levels/Predicate.lean @@ -1,14 +1,14 @@ -import TestGame.Levels.Predicate.L01_Ring -import TestGame.Levels.Predicate.L02_Rewrite -import TestGame.Levels.Predicate.L03_Rewrite -import TestGame.Levels.Predicate.L04_Ring -import TestGame.Levels.Predicate.L05_Rfl -import TestGame.Levels.Predicate.L06_Exists -import TestGame.Levels.Predicate.L07_Exists -import TestGame.Levels.Predicate.L08_Forall -import TestGame.Levels.Predicate.L09_PushNeg +import Adam.Levels.Predicate.L01_Ring +import Adam.Levels.Predicate.L02_Rewrite +import Adam.Levels.Predicate.L03_Rewrite +import Adam.Levels.Predicate.L04_Ring +import Adam.Levels.Predicate.L05_Rfl +import Adam.Levels.Predicate.L06_Exists +import Adam.Levels.Predicate.L07_Exists +import Adam.Levels.Predicate.L08_Forall +import Adam.Levels.Predicate.L09_PushNeg -Game "TestGame" +Game "Adam" World "Predicate" Title "Prädikate" diff --git a/server/testgame/TestGame/Levels/Predicate/L01_Ring.lean b/server/adam/Adam/Levels/Predicate/L01_Ring.lean similarity index 95% rename from server/testgame/TestGame/Levels/Predicate/L01_Ring.lean rename to server/adam/Adam/Levels/Predicate/L01_Ring.lean index ca8b143..fe84bac 100644 --- a/server/testgame/TestGame/Levels/Predicate/L01_Ring.lean +++ b/server/adam/Adam/Levels/Predicate/L01_Ring.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Ring --set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Predicate" Level 1 diff --git a/server/testgame/TestGame/Levels/Predicate/L02_Rewrite.lean b/server/adam/Adam/Levels/Predicate/L02_Rewrite.lean similarity index 96% rename from server/testgame/TestGame/Levels/Predicate/L02_Rewrite.lean rename to server/adam/Adam/Levels/Predicate/L02_Rewrite.lean index a45d6cf..0585180 100644 --- a/server/testgame/TestGame/Levels/Predicate/L02_Rewrite.lean +++ b/server/adam/Adam/Levels/Predicate/L02_Rewrite.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Predicate" Level 2 diff --git a/server/testgame/TestGame/Levels/Predicate/L03_Rewrite.lean b/server/adam/Adam/Levels/Predicate/L03_Rewrite.lean similarity index 94% rename from server/testgame/TestGame/Levels/Predicate/L03_Rewrite.lean rename to server/adam/Adam/Levels/Predicate/L03_Rewrite.lean index be4df47..b841059 100644 --- a/server/testgame/TestGame/Levels/Predicate/L03_Rewrite.lean +++ b/server/adam/Adam/Levels/Predicate/L03_Rewrite.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "Predicate" Level 3 diff --git a/server/testgame/TestGame/Levels/Predicate/L04_Ring.lean b/server/adam/Adam/Levels/Predicate/L04_Ring.lean similarity index 95% rename from server/testgame/TestGame/Levels/Predicate/L04_Ring.lean rename to server/adam/Adam/Levels/Predicate/L04_Ring.lean index 60291dc..8dd287f 100644 --- a/server/testgame/TestGame/Levels/Predicate/L04_Ring.lean +++ b/server/adam/Adam/Levels/Predicate/L04_Ring.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "Predicate" Level 4 diff --git a/server/testgame/TestGame/Levels/Predicate/L05_Rfl.lean b/server/adam/Adam/Levels/Predicate/L05_Rfl.lean similarity index 94% rename from server/testgame/TestGame/Levels/Predicate/L05_Rfl.lean rename to server/adam/Adam/Levels/Predicate/L05_Rfl.lean index e621f96..39b0ee3 100644 --- a/server/testgame/TestGame/Levels/Predicate/L05_Rfl.lean +++ b/server/adam/Adam/Levels/Predicate/L05_Rfl.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Predicate" Level 5 diff --git a/server/testgame/TestGame/Levels/Predicate/L06_Exists.lean b/server/adam/Adam/Levels/Predicate/L06_Exists.lean similarity index 98% rename from server/testgame/TestGame/Levels/Predicate/L06_Exists.lean rename to server/adam/Adam/Levels/Predicate/L06_Exists.lean index 79fd82b..f9d91be 100644 --- a/server/testgame/TestGame/Levels/Predicate/L06_Exists.lean +++ b/server/adam/Adam/Levels/Predicate/L06_Exists.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use @@ -8,7 +8,7 @@ import Mathlib.Algebra.Parity set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Predicate" Level 6 diff --git a/server/testgame/TestGame/Levels/Predicate/L07_Exists.lean b/server/adam/Adam/Levels/Predicate/L07_Exists.lean similarity index 96% rename from server/testgame/TestGame/Levels/Predicate/L07_Exists.lean rename to server/adam/Adam/Levels/Predicate/L07_Exists.lean index 26bb955..353b39e 100644 --- a/server/testgame/TestGame/Levels/Predicate/L07_Exists.lean +++ b/server/adam/Adam/Levels/Predicate/L07_Exists.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use @@ -8,7 +8,7 @@ import Mathlib.Algebra.Parity set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Predicate" Level 7 diff --git a/server/testgame/TestGame/Levels/Predicate/L08_Forall.lean b/server/adam/Adam/Levels/Predicate/L08_Forall.lean similarity index 97% rename from server/testgame/TestGame/Levels/Predicate/L08_Forall.lean rename to server/adam/Adam/Levels/Predicate/L08_Forall.lean index ff581b2..0e019e4 100644 --- a/server/testgame/TestGame/Levels/Predicate/L08_Forall.lean +++ b/server/adam/Adam/Levels/Predicate/L08_Forall.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use @@ -7,7 +7,7 @@ import Mathlib.Tactic.Ring import Mathlib.Algebra.Parity import Mathlib -Game "TestGame" +Game "Adam" World "Predicate" Level 8 diff --git a/server/testgame/TestGame/Levels/Predicate/L09_PushNeg.lean b/server/adam/Adam/Levels/Predicate/L09_PushNeg.lean similarity index 96% rename from server/testgame/TestGame/Levels/Predicate/L09_PushNeg.lean rename to server/adam/Adam/Levels/Predicate/L09_PushNeg.lean index 9eeab66..0c5bc91 100644 --- a/server/testgame/TestGame/Levels/Predicate/L09_PushNeg.lean +++ b/server/adam/Adam/Levels/Predicate/L09_PushNeg.lean @@ -1,12 +1,12 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.PushNeg import Mathlib import Mathlib.Algebra.Parity -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Predicate" Level 9 @@ -106,4 +106,4 @@ ist deine! " NewTactic push_neg -NewLemma even_iff_not_odd odd_iff_not_even not_exists not_forall +NewLemma Nat.even_iff_not_odd Nat.odd_iff_not_even not_exists not_forall diff --git a/server/adam/Adam/Levels/Prime.lean b/server/adam/Adam/Levels/Prime.lean new file mode 100644 index 0000000..6f1e466 --- /dev/null +++ b/server/adam/Adam/Levels/Prime.lean @@ -0,0 +1,11 @@ +import Adam.Levels.Prime.L01_Dvd +-- import Adam.Levels.Prime.L04_Prime +-- import Adam.Levels.Prime.L05_Prime +-- import Adam.Levels.Prime.L06_ExistsUnique + +Game "Adam" +World "Prime" +Title "Teilbarkeit" + +Introduction "Ihr schlendert durch die Befestigung ohne direktes Ziel. Und sprecht mit +verschiedenen Einwohnern." diff --git a/server/adam/Adam/Levels/Prime/L01_Dvd.lean b/server/adam/Adam/Levels/Prime/L01_Dvd.lean new file mode 100644 index 0000000..5e826eb --- /dev/null +++ b/server/adam/Adam/Levels/Prime/L01_Dvd.lean @@ -0,0 +1,49 @@ +import Adam.Metadata + +import Mathlib.Tactic.Ring +import Mathlib + +Game "Adam" +World "Prime" +Level 1 + +Title "Teilbarkeit" + +Introduction +" +Ihr begenet einer Frau, die mit Vorschlaghammer und Schaufel anscheinend an einer Erweiterung +ihres Hauses baut. Im gespräch erzählt sie euch wie die Dornenwände gezüchtet wurden vor ihrer +Zeit, und über's Wetter und so. + +**Handwerkerin**: (*langer Monolog*) …, und dann gestern habe ich zwei Herren überhört, +wie sie an folgender Aufgabe gesessen sind, könnt ihr mir das erklären? +" + +-- Die Aussage \"$m$ teilt $n$.\" wird in Lean als `m | n` (`\\|`) geschrieben. + +-- **Wichtig:** `∣` (Teilbarkeit) ist ein spezielles Unicode Symbol, das nicht dem +-- senkrechten Strich auf der Tastatur (`|`) entspricht. Man erhält es mit `\\|`. + +-- `m ∣ n` bedeutet `∃ c, n = m * c`, das heisst, man kann damit genau gleich umgehen +-- wie mit einem `∃`-Quantifier. + +Statement dvd_add (n m k : ℕ) (h : m ∣ n) (g : m ∣ k) : m ∣ n + k := by + Hint "**Robo**: `n ∣ m` bedeutet \"$n$ teilt $m$\", der senkrechte Strich ist allerdings + ein spezieller, den man mit `\\|` schreibt. + Definiert ist dieses Symbol als `∃ c, n = m * c`. + + **Du**: Dann kann ich direkt `rcases` und `use` verwenden, wie wenns ein `∃` wäre? + + **Robo**: Genau!" + Hint (hidden := true) "**Robo**: Fang doch damit an, mit `rcases _ with ⟨x ,hx⟩` + alle Hyptothesen aufzuteilen." + rcases h with ⟨x, h⟩ + rcases g with ⟨y, g⟩ + Hint (hidden := true) "**Robo**: Jetzt musst du mit `use _` eine Zahl angeben so dass + `{n} + {k} = {m} * _` gilt." + use x + y + Hint (hidden := true) "**Du**: Mit ein bisschen umschreiben kann man sicer `ring` verwenden." + rw [h, g] + ring + +DisabledLemma dvd_add diff --git a/server/adam/Adam/Levels/Prime/L02_Prime.lean b/server/adam/Adam/Levels/Prime/L02_Prime.lean new file mode 100644 index 0000000..58231bf --- /dev/null +++ b/server/adam/Adam/Levels/Prime/L02_Prime.lean @@ -0,0 +1,51 @@ +import Adam.Metadata +import Mathlib.Data.Nat.Prime + +import Std.Tactic.RCases +import Mathlib.Tactic.LeftRight +import Mathlib.Tactic.Contrapose +import Mathlib.Tactic.Use +import Mathlib.Tactic.Ring + +-- import Data.Nat.Prime + +import Adam.ToBePorted + +Game "Adam" +World "Prime" +Level 2 + +Title "Primzahlen" + +Introduction +" +Als nächstes Begnet ihr einem Lehrer, der nachdenkend an der Sonne sitzt. + +**Lehrer**: Sagt mal, mich hat heute einer meiner Schüler was gefragt, +und ich glaube einfach, der ist in so jungen Jahren bereits schlauer als ich. + +Hier etwas Kontext: +" + +Statement (p : ℕ) (h : Nat.Prime p) : ∀ (x : ℕ), (x ∣ p) → x = 1 ∨ x = p := by + Hint "**Du**: Die einzigen Teiler einer Primzahl sind `1` und `p`, ist das + nicht eine der möglichen Definitionen über `ℕ`? + + **Robo**: Doch, oder zumindest fast. + Du kannst du mit `rw` und `Nat.prime_def_lt''` eine der Definitionen für `Nat.Prime` einsetzen + + **Du** Könnte ich nicht einfach `unfold Nat.Prime` sagen um mir das anzuschauen. + + **Robo**: Bloss nicht. Das ist so eine Definition, in die du besser nicht hineinschaust! + `Nat.Prime p` ist als `Irreducible p` definiert, was wiederum anhand von Einheiten + definiert ist… Da verlieren wir uns in Definition die wir im Moment gar nicht brauchen." + rw [Nat.prime_def_lt''] at h + rcases h with ⟨_, h₂⟩ + assumption + +NewLemma Nat.prime_def_lt'' + +Conclusion "**Du**: Ich sehe, meine \"Definition\" hätte auch `1` als Primzahl deklariert. Gut, +dass wir das überprüft haben. + +**Lehrer**: Und jetzt kommen wir zu dem, was mir Kopfschmerzen bereitet." diff --git a/server/adam/Adam/Levels/Prime/L03_Prime.lean b/server/adam/Adam/Levels/Prime/L03_Prime.lean new file mode 100644 index 0000000..a437d02 --- /dev/null +++ b/server/adam/Adam/Levels/Prime/L03_Prime.lean @@ -0,0 +1,41 @@ +import Adam.Metadata +import Mathlib.Data.Nat.Prime + +import Std.Tactic.RCases +import Mathlib.Tactic.LeftRight +import Mathlib.Tactic.Contrapose +import Mathlib.Tactic.Use +import Mathlib.Tactic.Ring + +import Adam.ToBePorted + +Game "Adam" +World "Prime" +Level 3 + +Title "Primzahlen" + +Introduction +" +Der Lehrer erklärt sein Problem. + +**Lehrer**: Und dann fragte der Schüler, wie man denn folgendes herleitet. +Und dabei ist das weit über seiner Altersstufe! +" + +Statement + (p : ℕ) (h₂ : 2 ≤ p): Nat.Prime p ↔ ∀ (a b : ℕ), p ∣ a * b → p ∣ a ∨ p ∣ b := by + Hint "**Du**: Naja, mal schauen wie weit man mit `intro` und `constructor` kommt…" + constructor + intro h a b + Hint "**Robo**: Stop! Hier helfe ich dir etwas" + apply (Nat.Prime.dvd_mul h).mp + intro h + rw [Nat.prime_iff] + unfold Prime + rw [Nat.isUnit_iff, ←and_assoc] + constructor + constructor + linarith + linarith + assumption diff --git a/server/testgame/TestGame/Levels/Prime/L06_ExistsUnique.lean b/server/adam/Adam/Levels/Prime/L06_ExistsUnique.lean similarity index 89% rename from server/testgame/TestGame/Levels/Prime/L06_ExistsUnique.lean rename to server/adam/Adam/Levels/Prime/L06_ExistsUnique.lean index bd8a3dc..3094ea7 100644 --- a/server/testgame/TestGame/Levels/Prime/L06_ExistsUnique.lean +++ b/server/adam/Adam/Levels/Prime/L06_ExistsUnique.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Nat.Prime import Std.Tactic.RCases @@ -7,9 +7,9 @@ import Mathlib.Tactic.Contrapose import Mathlib.Tactic.Use import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Prime" Level 4 diff --git a/server/testgame/TestGame/Levels/Proposition.lean b/server/adam/Adam/Levels/Proposition.lean similarity index 66% rename from server/testgame/TestGame/Levels/Proposition.lean rename to server/adam/Adam/Levels/Proposition.lean index bf6ec84..640929b 100644 --- a/server/testgame/TestGame/Levels/Proposition.lean +++ b/server/adam/Adam/Levels/Proposition.lean @@ -1,19 +1,19 @@ -import TestGame.Levels.Proposition.L00_Tauto -import TestGame.Levels.Proposition.L01_Rfl -import TestGame.Levels.Proposition.L02_Assumption -import TestGame.Levels.Proposition.L03_Assumption -import TestGame.Levels.Proposition.L04_True -import TestGame.Levels.Proposition.L05_Not -import TestGame.Levels.Proposition.L06_False -import TestGame.Levels.Proposition.L07_ContraNotEq -import TestGame.Levels.Proposition.L08_Contra -import TestGame.Levels.Proposition.L09_And -import TestGame.Levels.Proposition.L10_And -import TestGame.Levels.Proposition.L11_Or -import TestGame.Levels.Proposition.L12_Or -import TestGame.Levels.Proposition.L13_Summary +import Adam.Levels.Proposition.L00_Tauto +import Adam.Levels.Proposition.L01_Rfl +import Adam.Levels.Proposition.L02_Assumption +import Adam.Levels.Proposition.L03_Assumption +import Adam.Levels.Proposition.L04_True +import Adam.Levels.Proposition.L05_Not +import Adam.Levels.Proposition.L06_False +import Adam.Levels.Proposition.L07_ContraNotEq +import Adam.Levels.Proposition.L08_Contra +import Adam.Levels.Proposition.L09_And +import Adam.Levels.Proposition.L10_And +import Adam.Levels.Proposition.L11_Or +import Adam.Levels.Proposition.L12_Or +import Adam.Levels.Proposition.L13_Summary -Game "TestGame" +Game "Adam" World "Proposition" Title "Aussagenlogik 1" diff --git a/server/testgame/TestGame/Levels/Proposition/L00_Tauto.lean b/server/adam/Adam/Levels/Proposition/L00_Tauto.lean similarity index 97% rename from server/testgame/TestGame/Levels/Proposition/L00_Tauto.lean rename to server/adam/Adam/Levels/Proposition/L00_Tauto.lean index 75a5ec7..041a578 100644 --- a/server/testgame/TestGame/Levels/Proposition/L00_Tauto.lean +++ b/server/adam/Adam/Levels/Proposition/L00_Tauto.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Tactic.Tauto -Game "TestGame" +Game "Adam" World "Proposition" Level 1 diff --git a/server/testgame/TestGame/Levels/Proposition/L01_Rfl.lean b/server/adam/Adam/Levels/Proposition/L01_Rfl.lean similarity index 94% rename from server/testgame/TestGame/Levels/Proposition/L01_Rfl.lean rename to server/adam/Adam/Levels/Proposition/L01_Rfl.lean index 3c56590..984e7f9 100644 --- a/server/testgame/TestGame/Levels/Proposition/L01_Rfl.lean +++ b/server/adam/Adam/Levels/Proposition/L01_Rfl.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Proposition" Level 2 diff --git a/server/testgame/TestGame/Levels/Proposition/L02_Assumption.lean b/server/adam/Adam/Levels/Proposition/L02_Assumption.lean similarity index 96% rename from server/testgame/TestGame/Levels/Proposition/L02_Assumption.lean rename to server/adam/Adam/Levels/Proposition/L02_Assumption.lean index e75e141..e3101cb 100644 --- a/server/testgame/TestGame/Levels/Proposition/L02_Assumption.lean +++ b/server/adam/Adam/Levels/Proposition/L02_Assumption.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Proposition" Level 3 diff --git a/server/testgame/TestGame/Levels/Proposition/L03_Assumption.lean b/server/adam/Adam/Levels/Proposition/L03_Assumption.lean similarity index 82% rename from server/testgame/TestGame/Levels/Proposition/L03_Assumption.lean rename to server/adam/Adam/Levels/Proposition/L03_Assumption.lean index 7a177eb..f341cbc 100644 --- a/server/testgame/TestGame/Levels/Proposition/L03_Assumption.lean +++ b/server/adam/Adam/Levels/Proposition/L03_Assumption.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Nat.Basic -- TODO -Game "TestGame" +Game "Adam" World "Proposition" Level 4 @@ -22,9 +22,9 @@ Statement "" **Robo** Ja. Da kommst Du jetzt selbst drauf, wie das geht, oder? " - Hint (hidden := true) "Ist doch genau wie eben: + Hint (hidden := true) "**Robo**: Ist doch genau wie eben: die Aussage, die zu beweisen ist, gehört selbst zu den Annahmen. -Also wird `asumption` auch wieder funktionieren." +Also wird `assumption` auch wieder funktionieren." assumption Conclusion diff --git a/server/testgame/TestGame/Levels/Proposition/L04_True.lean b/server/adam/Adam/Levels/Proposition/L04_True.lean similarity index 94% rename from server/testgame/TestGame/Levels/Proposition/L04_True.lean rename to server/adam/Adam/Levels/Proposition/L04_True.lean index 0549e7c..2be1ea1 100644 --- a/server/testgame/TestGame/Levels/Proposition/L04_True.lean +++ b/server/adam/Adam/Levels/Proposition/L04_True.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Proposition" Level 5 diff --git a/server/testgame/TestGame/Levels/Proposition/L05_Not.lean b/server/adam/Adam/Levels/Proposition/L05_Not.lean similarity index 93% rename from server/testgame/TestGame/Levels/Proposition/L05_Not.lean rename to server/adam/Adam/Levels/Proposition/L05_Not.lean index dc1d413..486072f 100644 --- a/server/testgame/TestGame/Levels/Proposition/L05_Not.lean +++ b/server/adam/Adam/Levels/Proposition/L05_Not.lean @@ -1,6 +1,6 @@ -import TestGame.Metadata +import Adam.Metadata -Game "TestGame" +Game "Adam" World "Proposition" Level 6 diff --git a/server/testgame/TestGame/Levels/Proposition/L06_False.lean b/server/adam/Adam/Levels/Proposition/L06_False.lean similarity index 96% rename from server/testgame/TestGame/Levels/Proposition/L06_False.lean rename to server/adam/Adam/Levels/Proposition/L06_False.lean index 27d0da1..7f9ebb1 100644 --- a/server/testgame/TestGame/Levels/Proposition/L06_False.lean +++ b/server/adam/Adam/Levels/Proposition/L06_False.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight -Game "TestGame" +Game "Adam" World "Proposition" Level 7 diff --git a/server/testgame/TestGame/Levels/Proposition/L07_ContraNotEq.lean b/server/adam/Adam/Levels/Proposition/L07_ContraNotEq.lean similarity index 91% rename from server/testgame/TestGame/Levels/Proposition/L07_ContraNotEq.lean rename to server/adam/Adam/Levels/Proposition/L07_ContraNotEq.lean index a7193df..c941a88 100644 --- a/server/testgame/TestGame/Levels/Proposition/L07_ContraNotEq.lean +++ b/server/adam/Adam/Levels/Proposition/L07_ContraNotEq.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Proposition" Level 8 diff --git a/server/testgame/TestGame/Levels/Proposition/L08_Contra.lean b/server/adam/Adam/Levels/Proposition/L08_Contra.lean similarity index 90% rename from server/testgame/TestGame/Levels/Proposition/L08_Contra.lean rename to server/adam/Adam/Levels/Proposition/L08_Contra.lean index 296444e..94f4aa4 100644 --- a/server/testgame/TestGame/Levels/Proposition/L08_Contra.lean +++ b/server/adam/Adam/Levels/Proposition/L08_Contra.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Proposition" Level 9 diff --git a/server/testgame/TestGame/Levels/Proposition/L09_And.lean b/server/adam/Adam/Levels/Proposition/L09_And.lean similarity index 93% rename from server/testgame/TestGame/Levels/Proposition/L09_And.lean rename to server/adam/Adam/Levels/Proposition/L09_And.lean index 773259e..3ba43a8 100644 --- a/server/testgame/TestGame/Levels/Proposition/L09_And.lean +++ b/server/adam/Adam/Levels/Proposition/L09_And.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Proposition" Level 10 @@ -12,12 +12,12 @@ Title "Und" Introduction " Der nächste Formalosoph in der Reihe hat seine Frage bereìts mitgebracht. -Er legt sie uns vor, setzt sich hin, und häkelt. +Er legt sie uns vor, setzt sich hin und häkelt. " Statement "" (A B : Prop) (hA : A) (hB : B) : A ∧ B := by Hint " -**Du**: Also, wir haben zwei Annahmen: `{A}` gilt, und `{B}` gilt. Auch. Und beweisen sollen wir +**Du**: Also, wir haben zwei Annahmen: `{A}` gilt, und `{B}` gilt auch. Und beweisen sollen wir dass `{A} und {B}` gilt. Ich glaube, diese Formalospinner treiben mich noch zur Verzweiflung. Kann ich nicht wieder `trivial` sagen? diff --git a/server/testgame/TestGame/Levels/Proposition/L10_And.lean b/server/adam/Adam/Levels/Proposition/L10_And.lean similarity index 96% rename from server/testgame/TestGame/Levels/Proposition/L10_And.lean rename to server/adam/Adam/Levels/Proposition/L10_And.lean index c73dac6..0d4de0a 100644 --- a/server/testgame/TestGame/Levels/Proposition/L10_And.lean +++ b/server/adam/Adam/Levels/Proposition/L10_And.lean @@ -1,9 +1,9 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Proposition" Level 11 diff --git a/server/testgame/TestGame/Levels/Proposition/L11_Or.lean b/server/adam/Adam/Levels/Proposition/L11_Or.lean similarity index 95% rename from server/testgame/TestGame/Levels/Proposition/L11_Or.lean rename to server/adam/Adam/Levels/Proposition/L11_Or.lean index 0c5878b..b3642a9 100644 --- a/server/testgame/TestGame/Levels/Proposition/L11_Or.lean +++ b/server/adam/Adam/Levels/Proposition/L11_Or.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight --set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Proposition" Level 12 diff --git a/server/testgame/TestGame/Levels/Proposition/L12_Or.lean b/server/adam/Adam/Levels/Proposition/L12_Or.lean similarity index 99% rename from server/testgame/TestGame/Levels/Proposition/L12_Or.lean rename to server/adam/Adam/Levels/Proposition/L12_Or.lean index 90aa1b1..8c6959c 100644 --- a/server/testgame/TestGame/Levels/Proposition/L12_Or.lean +++ b/server/adam/Adam/Levels/Proposition/L12_Or.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight @@ -7,7 +7,7 @@ set_option tactic.hygienic false --set_option autoImplicit false -Game "TestGame" +Game "Adam" World "Proposition" Level 13 diff --git a/server/testgame/TestGame/Levels/Proposition/L13_Summary.lean b/server/adam/Adam/Levels/Proposition/L13_Summary.lean similarity index 98% rename from server/testgame/TestGame/Levels/Proposition/L13_Summary.lean rename to server/adam/Adam/Levels/Proposition/L13_Summary.lean index 6db6c77..8d4c151 100644 --- a/server/testgame/TestGame/Levels/Proposition/L13_Summary.lean +++ b/server/adam/Adam/Levels/Proposition/L13_Summary.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Std.Tactic.RCases import Mathlib.Tactic.LeftRight set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Proposition" Level 14 diff --git a/server/adam/Adam/Levels/SetFunction.lean b/server/adam/Adam/Levels/SetFunction.lean new file mode 100644 index 0000000..a6f2b4b --- /dev/null +++ b/server/adam/Adam/Levels/SetFunction.lean @@ -0,0 +1,8 @@ +import Adam.Levels.SetFunction.L01_Image +import Adam.Levels.SetFunction.L02_Preimage +import Adam.Levels.SetFunction.L03_Range +import Adam.Levels.SetFunction.L04_ImageUnion + +Game "Adam" +World "SetFunction" +Title "Abbildungen 2" diff --git a/server/testgame/TestGame/Levels/SetFunction/L01_Image.lean b/server/adam/Adam/Levels/SetFunction/L01_Image.lean similarity index 97% rename from server/testgame/TestGame/Levels/SetFunction/L01_Image.lean rename to server/adam/Adam/Levels/SetFunction/L01_Image.lean index 1bfede9..9d0dbd6 100644 --- a/server/testgame/TestGame/Levels/SetFunction/L01_Image.lean +++ b/server/adam/Adam/Levels/SetFunction/L01_Image.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "SetFunction" Level 1 diff --git a/server/testgame/TestGame/Levels/SetFunction/L02_Preimage.lean b/server/adam/Adam/Levels/SetFunction/L02_Preimage.lean similarity index 83% rename from server/testgame/TestGame/Levels/SetFunction/L02_Preimage.lean rename to server/adam/Adam/Levels/SetFunction/L02_Preimage.lean index b94e605..4f37c77 100644 --- a/server/testgame/TestGame/Levels/SetFunction/L02_Preimage.lean +++ b/server/adam/Adam/Levels/SetFunction/L02_Preimage.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "SetFunction" Level 2 diff --git a/server/testgame/TestGame/Levels/SetFunction/L03_Range.lean b/server/adam/Adam/Levels/SetFunction/L03_Range.lean similarity index 83% rename from server/testgame/TestGame/Levels/SetFunction/L03_Range.lean rename to server/adam/Adam/Levels/SetFunction/L03_Range.lean index 21d2ccc..4809e8f 100644 --- a/server/testgame/TestGame/Levels/SetFunction/L03_Range.lean +++ b/server/adam/Adam/Levels/SetFunction/L03_Range.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "SetFunction" Level 3 diff --git a/server/testgame/TestGame/Levels/SetFunction/L04_ImageUnion.lean b/server/adam/Adam/Levels/SetFunction/L04_ImageUnion.lean similarity index 83% rename from server/testgame/TestGame/Levels/SetFunction/L04_ImageUnion.lean rename to server/adam/Adam/Levels/SetFunction/L04_ImageUnion.lean index 7bfcfca..ccf1c7a 100644 --- a/server/testgame/TestGame/Levels/SetFunction/L04_ImageUnion.lean +++ b/server/adam/Adam/Levels/SetFunction/L04_ImageUnion.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "SetFunction" Level 4 diff --git a/server/adam/Adam/Levels/SetTheory.lean b/server/adam/Adam/Levels/SetTheory.lean new file mode 100644 index 0000000..59ca233 --- /dev/null +++ b/server/adam/Adam/Levels/SetTheory.lean @@ -0,0 +1,43 @@ +import Adam.Levels.SetTheory.L01_Univ +import Adam.Levels.SetTheory.L02_Empty +import Adam.Levels.SetTheory.L03_Subset +import Adam.Levels.SetTheory.L04_SubsetEmpty +import Adam.Levels.SetTheory.L05_Empty +import Adam.Levels.SetTheory.L06_Nonempty +import Adam.Levels.SetTheory.L07_UnionInter +import Adam.Levels.SetTheory.L08_UnionInter +import Adam.Levels.SetTheory.L09_Complement +import Adam.Levels.SetTheory.L10_Morgan +import Adam.Levels.SetTheory.L11_SSubset +import Adam.Levels.SetTheory.L12_Insert +import Adam.Levels.SetTheory.L13_Insert +import Adam.Levels.SetTheory.L14_SetOf +import Adam.Levels.SetTheory.L15_Powerset +import Adam.Levels.SetTheory.L16_Disjoint +import Adam.Levels.SetTheory.L17_SetOf +import Adam.Levels.SetTheory.L18_SetOf +import Adam.Levels.SetTheory.L19_Subtype + + +Game "Adam" +World "SetTheory" +Title "Mengenlehre" + +Introduction +"Der größere der beiden Monde sieht dunkelrot und karg aus. Trotzdem sollen dort nomadische +Gesellschaften wohnen, die sich in der Einöde zurechtfinden. + +Ihr steuert einen der wenigen befestigten Standorte am Fusse eines Berges an. + +**Robo**: Die Bevölkerung hier lebt so abgekapselt vom Rest des Universums, dass sie sich +vermutlich noch viel besser mit alter Sprache und Schrift auskennt. + +**Du**: Hoffen wir, dass sie uns weiterhelfen können dieses Buch der Urbilder zu entschlüsseln. + +Sofort begrüßt euch eine ältere Frau, die sich als *Mengea*, die Beschützerin des Mondes, +vorstellt. +" + +Game "Adam" +World "SetTheory2" +Title "Mehr Mengenlehre" diff --git a/server/adam/Adam/Levels/SetTheory/L01_Univ.lean b/server/adam/Adam/Levels/SetTheory/L01_Univ.lean new file mode 100644 index 0000000..f192095 --- /dev/null +++ b/server/adam/Adam/Levels/SetTheory/L01_Univ.lean @@ -0,0 +1,57 @@ +import Adam.Metadata + +import Mathlib.Init.Set +import Mathlib.Tactic.Tauto + +set_option tactic.hygienic false +set_option autoImplicit false + +Game "Adam" +World "SetTheory" +Level 1 + +Title "Mengen" + +Introduction +" +**Mengea**: Ich würde leider den Inhalt jenes Buches eh nicht verstehen. Aber der beste Weg für +euch, dieses zu entschlüsseln ist, euch ausgiebig mit der Bevölkerung hier zu unterhalten. +Lebt mit ihnen, redet mit ihnen und ihr werdet die Sprache automatisch lernen. + +**Mengea**: Seit aber vorgewarnt, die Leute hier denken ganz viel über Mengen nach, +womit sie immer *homogene Mengen* meinen. Eine Menge natürlicher Zahlen `{1, 4, 6}` ist +verständlich, aber sowas wie eine Menge `{(2 : ℕ), {3, 1}, \"e\", (1 : ℂ)}` gibt es hier +einfach nicht. Punkt. + +**Robo**: Als Kontext: Wenn `A` ein beliebiger `Type` ist, dann ist `(U : Set A)` eine Menge +mit Elementen aus `A` + +**Mengea**: Damit ich weiss, dass ihr euch grundsätzlich mit den Leuten austauschen könnt, +erklärt mir doch folgendes: +" + +open Set + +Statement mem_univ "" {A : Type} (x : A) : x ∈ (univ : Set A) := by + Hint "**Du**: Also `A` ist ein `Type`, `x` ist ein Element in `A`… + + **Robo** … und `univ` ist die Menge aller Elemente in `A`. + + **Du** ist das nicht einfach `A` selber? + + **Robo** Fast, aber das eine ist ein `Type`, das andere eine Menge, also vom Typ `Set A`. + + **Du**: Unlogisch. + + **Mengites**: Naja, Typen und Mengen sind halt zwei unterschiedliche Sachen und wenn ihr + über Mengen sprechen wollt, müssen alles Mengen sein. + + **Du**: Na gut. Und wieso `x ∈ univ` und nicht `x : univ` wie bei Typen? + + **Robo**: Jedes Element `(x : A)` hat entweder die Eigenschaft `x ∈ U` oder `x ∉ U` für eine + Menge `(U : Set A)`. (`\\in`, `\\nin`) + + **Du**: Also das ist ja dann `trivial`. Hoffentlich sehen die das hier auch so…" + trivial + +Conclusion "**Mengea**: Ja das stimmt schon. Dann wünsche ich euch viel Erfolg auf eurer Reise!" diff --git a/server/testgame/TestGame/Levels/SetTheory/L02_Empty.lean b/server/adam/Adam/Levels/SetTheory/L02_Empty.lean similarity index 53% rename from server/testgame/TestGame/Levels/SetTheory/L02_Empty.lean rename to server/adam/Adam/Levels/SetTheory/L02_Empty.lean index 193a6a6..1840659 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L02_Empty.lean +++ b/server/adam/Adam/Levels/SetTheory/L02_Empty.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Init.Set import Mathlib.Tactic.Tauto set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 2 @@ -20,15 +20,16 @@ open Set Statement not_mem_empty "" {A : Type} (x : A) : x ∉ (∅ : Set A) := by - tauto - -NewLemma mem_univ + Hint "**Du**: Kein Element ist in der leeren Menge enthalten? Das ist ja alles + tautologisches Zeugs... -Hint (A : Type) (x : A) : x ∉ (∅ : Set A) => -"**Du**: Kein Element ist in der leeren Menge enthalten? Das ist ja alles tautologisches Zeugs... + **Robo**: Dann behaupte das doch." + tauto -**Robo**: Dann behaupte das doch. (`\\empty`)" +NewLemma Set.mem_univ Conclusion "Der Junge rennt weiter. -**Du**: So wird das ganze schon angenehmer." +**Du**: So wird das ganze schon angenehmer. + +**Robo**: Die Leere Menge schreibst du mit `\\empty` falls du die nochmals brauchst." diff --git a/server/adam/Adam/Levels/SetTheory/L03_Subset.lean b/server/adam/Adam/Levels/SetTheory/L03_Subset.lean new file mode 100644 index 0000000..f87406a --- /dev/null +++ b/server/adam/Adam/Levels/SetTheory/L03_Subset.lean @@ -0,0 +1,49 @@ +import Adam.Metadata + +import Mathlib.Init.Set +import Mathlib.Tactic.Tauto + +set_option tactic.hygienic false + +Game "Adam" +World "SetTheory" +Level 3 + +Title "Teilmengen" + +Introduction +" +Ihr bemerkt, dass mit dem Jungen noch zwei andere +Kinder zuhörten. Eines der beiden Mädchen hat ebenfalls eine Frage. +" + +-- Hat man zwei Mengen `(A B : Set ℕ)` kann man fragen, ob diese Teilmengen +-- voneinander sind: `A ⊆ B` (`\\sub`/`\\ss`) ist die Notation für Teilmengen, die auch gleich +-- sein können. + +-- `A ⊆ B` ist als `∀ x, x ∈ A → x ∈ B` definiert, das heisst, ein `⊆` kann immer auch mit `intro x hx` +-- angegangen werden. + +-- Die Taktik `tauto` macht das automatisch, aber um dies zu lernen ist `tauto` hier deaktiviert. +-- Benutze also `intro`: + +namespace MySet + +open Set + +Statement (A : Set ℕ) : A ⊆ univ := by + Hint "**Robo**: `A ⊆ B` ist als `∀ x, x ∈ A → x ∈ B` definiert. + + **Du**: Also kann ich mit `intro` anfangen, wie ich das bei einem `∀` funktioniert? + + **Robo**: Das ist korrekt." + intro h hA + Hint (hidden := true) "**Robo**: Das dürfte eine Trivialität sein." + trivial --apply mem_univ -- or `trivial`. + +DisabledTactic tauto simp +NewDefinition Symbol.Subset + +Conclusion "Damit drehen sich die beiden Mädchen um und folgen dem Jungen." + +end MySet diff --git a/server/testgame/TestGame/Levels/SetTheory/L04_SubsetEmpty.lean b/server/adam/Adam/Levels/SetTheory/L04_SubsetEmpty.lean similarity index 56% rename from server/testgame/TestGame/Levels/SetTheory/L04_SubsetEmpty.lean rename to server/adam/Adam/Levels/SetTheory/L04_SubsetEmpty.lean index d8a6990..9889ea6 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L04_SubsetEmpty.lean +++ b/server/adam/Adam/Levels/SetTheory/L04_SubsetEmpty.lean @@ -1,12 +1,13 @@ -import TestGame.Metadata -import TestGame.Levels.SetTheory.L03_Subset +import Adam.Metadata +import Adam.Levels.SetTheory.L03_Subset import Mathlib.Init.Set import Mathlib.Tactic.Tauto +import Mathlib set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 4 @@ -14,10 +15,14 @@ Title "Teilmengen" Introduction " +Etwas weiter kommt ihr an einem kleinen Gemüsestand vorbei. Da ihr nicht so +richtig einen Plan habt, fragt ihr den Verkäufer. + +**Verkäufer**: Hier ist was ganz wichtiges, was ihr noch oft brauchen werdet: Ein zentrales Lemma ist `Subset.antisymm_iff` welches folgendes sagt: ``` -A = B ↔ A ⊆ B ∧ B ⊆ A +lemma antisymm_iff {α : Type} {A B : Set α} : A = B ↔ A ⊆ B ∧ B ⊆ A ``` Fast immer wenn man Gleichheiten von Mengen zeigen muss, will man diese in zwei Ungleichungen @@ -26,7 +31,7 @@ aufteilen. namespace MySet -open Set +open Set Subset -- Copied some lemmas from `Matlib.Data.Set.Basic` in order to not import the entire file. theorem tmp {α : Type _} {s t : Set α} : s = t → s ⊆ t := @@ -39,14 +44,17 @@ theorem Subset.antisymm_iff {α : Type _} {a b : Set α} : a = b ↔ a ⊆ b ∧ theorem empty_subset {α : Type _} (s : Set α) : ∅ ⊆ s := fun. -Statement subset_empty_iff -"Die einzige Teilmenge der leeren Menge ist die leere Menge." - {A : Type _} (s : Set A) : +Statement subset_empty_iff {A : Type _} (s : Set A) : s ⊆ ∅ ↔ s = ∅ := by + Hint "**Du**: Ja, die einzige Teilmenge der leeren Menge ist die leere Menge. + Das ist doch eine Tautologie? + + **Robo**: Ja schon, aber zuerst einmal explizit." + Hint (hidden := true) "**Robo**: Fang doch einmal mit `constructor` an." constructor intro h - rw [Subset.antisymm_iff] - constructor + Hint "**Robo**: " + apply Subset.antisymm assumption simp only [empty_subset] intro a @@ -54,8 +62,7 @@ Statement subset_empty_iff rcases a with ⟨h₁, h₂⟩ assumption -NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset +DisabledTactic tauto +NewLemma Subset.antisymm Subset.antisymm_iff empty_subset end MySet diff --git a/server/testgame/TestGame/Levels/SetTheory/L05_Empty.lean b/server/adam/Adam/Levels/SetTheory/L05_Empty.lean similarity index 88% rename from server/testgame/TestGame/Levels/SetTheory/L05_Empty.lean rename to server/adam/Adam/Levels/SetTheory/L05_Empty.lean index 15f6394..f284019 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L05_Empty.lean +++ b/server/adam/Adam/Levels/SetTheory/L05_Empty.lean @@ -1,5 +1,5 @@ -import TestGame.Metadata -import TestGame.Levels.SetTheory.L04_SubsetEmpty +import Adam.Metadata +import Adam.Levels.SetTheory.L04_SubsetEmpty --import Mathlib.Data.Set.Basic import Mathlib.Init.Set @@ -8,7 +8,7 @@ import Mathlib.Tactic.PushNeg set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 5 @@ -47,6 +47,4 @@ Statement eq_empty_iff_forall_not_mem NewTactic constructor intro rw assumption rcases simp tauto trivial -NewLemma Subset.antisymm_iff empty_subset - end MySet diff --git a/server/testgame/TestGame/Levels/SetTheory/L06_Nonempty.lean b/server/adam/Adam/Levels/SetTheory/L06_Nonempty.lean similarity index 83% rename from server/testgame/TestGame/Levels/SetTheory/L06_Nonempty.lean rename to server/adam/Adam/Levels/SetTheory/L06_Nonempty.lean index bc69079..a55b084 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L06_Nonempty.lean +++ b/server/adam/Adam/Levels/SetTheory/L06_Nonempty.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata -import TestGame.Levels.SetTheory.L05_Empty +import Adam.Metadata +import Adam.Levels.SetTheory.L05_Empty import Mathlib.Data.Set.Basic set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 6 @@ -31,5 +31,3 @@ Statement nonempty_iff_ne_empty rfl NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L07_UnionInter.lean b/server/adam/Adam/Levels/SetTheory/L07_UnionInter.lean similarity index 86% rename from server/testgame/TestGame/Levels/SetTheory/L07_UnionInter.lean rename to server/adam/Adam/Levels/SetTheory/L07_UnionInter.lean index 098ca27..31f8c1d 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L07_UnionInter.lean +++ b/server/adam/Adam/Levels/SetTheory/L07_UnionInter.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 7 @@ -27,5 +27,3 @@ Statement simp NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L08_UnionInter.lean b/server/adam/Adam/Levels/SetTheory/L08_UnionInter.lean similarity index 87% rename from server/testgame/TestGame/Levels/SetTheory/L08_UnionInter.lean rename to server/adam/Adam/Levels/SetTheory/L08_UnionInter.lean index 906bac4..072434b 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L08_UnionInter.lean +++ b/server/adam/Adam/Levels/SetTheory/L08_UnionInter.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 8 @@ -31,5 +31,3 @@ Statement rw [univ_union] NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L09_Complement.lean b/server/adam/Adam/Levels/SetTheory/L09_Complement.lean similarity index 87% rename from server/testgame/TestGame/Levels/SetTheory/L09_Complement.lean rename to server/adam/Adam/Levels/SetTheory/L09_Complement.lean index f454337..0635df4 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L09_Complement.lean +++ b/server/adam/Adam/Levels/SetTheory/L09_Complement.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic -Game "TestGame" +Game "Adam" World "SetTheory" Level 9 @@ -31,5 +31,3 @@ Statement exact h4 NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L10_Morgan.lean b/server/adam/Adam/Levels/SetTheory/L10_Morgan.lean similarity index 97% rename from server/testgame/TestGame/Levels/SetTheory/L10_Morgan.lean rename to server/adam/Adam/Levels/SetTheory/L10_Morgan.lean index 76b6900..db12481 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L10_Morgan.lean +++ b/server/adam/Adam/Levels/SetTheory/L10_Morgan.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic -Game "TestGame" +Game "Adam" World "SetTheory" Level 10 diff --git a/server/testgame/TestGame/Levels/SetTheory/L11_SSubset.lean b/server/adam/Adam/Levels/SetTheory/L11_SSubset.lean similarity index 90% rename from server/testgame/TestGame/Levels/SetTheory/L11_SSubset.lean rename to server/adam/Adam/Levels/SetTheory/L11_SSubset.lean index 6dd11f4..e587290 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L11_SSubset.lean +++ b/server/adam/Adam/Levels/SetTheory/L11_SSubset.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic -Game "TestGame" +Game "Adam" World "SetTheory" Level 11 @@ -34,5 +34,3 @@ Statement exact hx NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L12_Insert.lean b/server/adam/Adam/Levels/SetTheory/L12_Insert.lean similarity index 91% rename from server/testgame/TestGame/Levels/SetTheory/L12_Insert.lean rename to server/adam/Adam/Levels/SetTheory/L12_Insert.lean index 40c786d..6996503 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L12_Insert.lean +++ b/server/adam/Adam/Levels/SetTheory/L12_Insert.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic -Game "TestGame" +Game "Adam" World "SetTheory" Level 12 @@ -33,5 +33,3 @@ Statement rfl NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L13_Insert.lean b/server/adam/Adam/Levels/SetTheory/L13_Insert.lean similarity index 95% rename from server/testgame/TestGame/Levels/SetTheory/L13_Insert.lean rename to server/adam/Adam/Levels/SetTheory/L13_Insert.lean index cb32a1a..30ab7d8 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L13_Insert.lean +++ b/server/adam/Adam/Levels/SetTheory/L13_Insert.lean @@ -1,8 +1,8 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic -Game "TestGame" +Game "Adam" World "SetTheory" Level 13 diff --git a/server/testgame/TestGame/Levels/SetTheory/L14_SetOf.lean b/server/adam/Adam/Levels/SetTheory/L14_SetOf.lean similarity index 89% rename from server/testgame/TestGame/Levels/SetTheory/L14_SetOf.lean rename to server/adam/Adam/Levels/SetTheory/L14_SetOf.lean index 50a1e18..e0fcc3c 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L14_SetOf.lean +++ b/server/adam/Adam/Levels/SetTheory/L14_SetOf.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "SetTheory2" Level 1 @@ -33,5 +33,3 @@ Statement ring NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L15_Powerset.lean b/server/adam/Adam/Levels/SetTheory/L15_Powerset.lean similarity index 88% rename from server/testgame/TestGame/Levels/SetTheory/L15_Powerset.lean rename to server/adam/Adam/Levels/SetTheory/L15_Powerset.lean index 7162728..9c8acc9 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L15_Powerset.lean +++ b/server/adam/Adam/Levels/SetTheory/L15_Powerset.lean @@ -1,12 +1,12 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "SetTheory2" Level 2 @@ -38,5 +38,3 @@ Statement NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L16_Disjoint.lean b/server/adam/Adam/Levels/SetTheory/L16_Disjoint.lean similarity index 90% rename from server/testgame/TestGame/Levels/SetTheory/L16_Disjoint.lean rename to server/adam/Adam/Levels/SetTheory/L16_Disjoint.lean index df5d23e..5cf6745 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L16_Disjoint.lean +++ b/server/adam/Adam/Levels/SetTheory/L16_Disjoint.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib import Mathlib.Algebra.Parity import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "SetTheory2" Level 3 @@ -37,5 +37,3 @@ Statement NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L17_SetOf.lean b/server/adam/Adam/Levels/SetTheory/L17_SetOf.lean similarity index 86% rename from server/testgame/TestGame/Levels/SetTheory/L17_SetOf.lean rename to server/adam/Adam/Levels/SetTheory/L17_SetOf.lean index 94d3ae8..80b1bb2 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L17_SetOf.lean +++ b/server/adam/Adam/Levels/SetTheory/L17_SetOf.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib -Game "TestGame" +Game "Adam" World "SetTheory2" Level 4 @@ -35,5 +35,3 @@ Statement NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L18_SetOf.lean b/server/adam/Adam/Levels/SetTheory/L18_SetOf.lean similarity index 87% rename from server/testgame/TestGame/Levels/SetTheory/L18_SetOf.lean rename to server/adam/Adam/Levels/SetTheory/L18_SetOf.lean index 5d81257..211ec53 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L18_SetOf.lean +++ b/server/adam/Adam/Levels/SetTheory/L18_SetOf.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib -Game "TestGame" +Game "Adam" World "SetTheory2" Level 5 @@ -29,5 +29,3 @@ Statement library_search NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L19_Subtype.lean b/server/adam/Adam/Levels/SetTheory/L19_Subtype.lean similarity index 78% rename from server/testgame/TestGame/Levels/SetTheory/L19_Subtype.lean rename to server/adam/Adam/Levels/SetTheory/L19_Subtype.lean index 93569fb..20d82c2 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L19_Subtype.lean +++ b/server/adam/Adam/Levels/SetTheory/L19_Subtype.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "SetTheory2" Level 6 @@ -24,5 +24,3 @@ Statement ring NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L20_UnionInter.lean b/server/adam/Adam/Levels/SetTheory/L20_UnionInter.lean similarity index 82% rename from server/testgame/TestGame/Levels/SetTheory/L20_UnionInter.lean rename to server/adam/Adam/Levels/SetTheory/L20_UnionInter.lean index 7a9d10e..132da70 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L20_UnionInter.lean +++ b/server/adam/Adam/Levels/SetTheory/L20_UnionInter.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib -Game "TestGame" +Game "Adam" World "SetTheory2" Level 7 @@ -23,5 +23,3 @@ Statement "" : True := sorry NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/L21_Summary.lean b/server/adam/Adam/Levels/SetTheory/L21_Summary.lean similarity index 78% rename from server/testgame/TestGame/Levels/SetTheory/L21_Summary.lean rename to server/adam/Adam/Levels/SetTheory/L21_Summary.lean index 52d376c..83e645c 100644 --- a/server/testgame/TestGame/Levels/SetTheory/L21_Summary.lean +++ b/server/adam/Adam/Levels/SetTheory/L21_Summary.lean @@ -1,10 +1,10 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Data.Set.Basic import Mathlib.Algebra.Parity import Mathlib.Tactic.Ring -Game "TestGame" +Game "Adam" World "SetTheory" Level 21 @@ -24,5 +24,3 @@ Statement ring NewTactic constructor intro rw assumption rcases simp tauto trivial - -NewLemma Subset.antisymm_iff empty_subset diff --git a/server/testgame/TestGame/Levels/SetTheory/PowersetPlayground.lean b/server/adam/Adam/Levels/SetTheory/PowersetPlayground.lean similarity index 100% rename from server/testgame/TestGame/Levels/SetTheory/PowersetPlayground.lean rename to server/adam/Adam/Levels/SetTheory/PowersetPlayground.lean diff --git a/server/testgame/TestGame/Levels/SetTheory/T01_Set.lean b/server/adam/Adam/Levels/SetTheory/T01_Set.lean similarity index 99% rename from server/testgame/TestGame/Levels/SetTheory/T01_Set.lean rename to server/adam/Adam/Levels/SetTheory/T01_Set.lean index f8ac55d..21e9d0b 100644 --- a/server/testgame/TestGame/Levels/SetTheory/T01_Set.lean +++ b/server/adam/Adam/Levels/SetTheory/T01_Set.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib.Order.SymmDiff import Mathlib.Logic.Function.Iterate @@ -14,7 +14,7 @@ import Mathlib set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 1 diff --git a/server/testgame/TestGame/Levels/SetTheory/T04_xx.lean b/server/adam/Adam/Levels/SetTheory/T04_xx.lean similarity index 97% rename from server/testgame/TestGame/Levels/SetTheory/T04_xx.lean rename to server/adam/Adam/Levels/SetTheory/T04_xx.lean index bb8523c..7d0f0ad 100644 --- a/server/testgame/TestGame/Levels/SetTheory/T04_xx.lean +++ b/server/adam/Adam/Levels/SetTheory/T04_xx.lean @@ -1,4 +1,4 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib import Duper.Tactic @@ -8,7 +8,7 @@ import Mathlib.Order.Disjoint set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "SetTheory" Level 4 diff --git a/server/testgame/TestGame/Levels/StatementTest.lean b/server/adam/Adam/Levels/StatementTest.lean similarity index 93% rename from server/testgame/TestGame/Levels/StatementTest.lean rename to server/adam/Adam/Levels/StatementTest.lean index 2d00bb9..db6bc7f 100644 --- a/server/testgame/TestGame/Levels/StatementTest.lean +++ b/server/adam/Adam/Levels/StatementTest.lean @@ -1,7 +1,7 @@ -import TestGame.Metadata +import Adam.Metadata import Mathlib -Game "TestGame" +Game "Adam" World "TestWorld" Level 1 diff --git a/server/adam/Adam/Levels/Sum.lean b/server/adam/Adam/Levels/Sum.lean new file mode 100644 index 0000000..5f5172b --- /dev/null +++ b/server/adam/Adam/Levels/Sum.lean @@ -0,0 +1,20 @@ +import Adam.Levels.Sum.L01_Simp +import Adam.Levels.Sum.L02_Sum +import Adam.Levels.Sum.L03_ArithSum +import Adam.Levels.Sum.L04_SumOdd +import Adam.Levels.Sum.L05_SumComm +import Adam.Levels.Sum.L06_Summary + +Game "Adam" +World "Sum" +Title "Endliche Summe" + +Introduction "Mit dem Gefühl, dass sich *Evenine* und *Oddeus* in Zukunft wieder +besser verstehen werden, steigt ihr in eurer Raumschiff und setzt eure Reise fort. + +Bald erreicht ihr einen neuen Planet. Die oberfläche scheint steinig zu sein, aber nicht etwa +geröll oder Chaos. Stattdessen, scheinen unzählige Steinplatten zu bizzaren hohen Türme +gestapelt und die ganze Landschaft wirkt wie ein grosses Puzzle in dem jede Platte +feinsäuberlich auf den darunterliegenden Platten aufbaut. + +Bald trefft ihr auch die Bewohner dieses Planeten an." diff --git a/server/adam/Adam/Levels/Sum/L01_Simp.lean b/server/adam/Adam/Levels/Sum/L01_Simp.lean new file mode 100644 index 0000000..a735024 --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L01_Simp.lean @@ -0,0 +1,66 @@ +import Adam.Metadata + +import Adam.ToBePorted + +set_option tactic.hygienic false + +Game "Adam" +World "Sum" +Level 1 + +Title "Simp" + +Introduction +" +**Unbekannte**: Willkommen auf *Indu*, unserem Planeten! Bevor ich euch herumzeigen will, +sagt mir, ob ihr unsere Lebensweise zu verstehen und schätzen wisst: +In diesem Kapitel lernen wir endliche Summen und mehr Übungen zur Induktion. + +" + +-- Eine endliche Summe läuft erstmal immer über einen endlichen Index +-- `Fin n`, welcher $n$ Elemente +-- $\\{0, 1, \\ldots, n-1\\}$ beinhaltet. + +-- Der Syntax für $\\sum_{i=0}^n a_i$ ist `∑ i : Fin n, _` (\\sum) + +-- Als erstes kann die Taktik `simp` (für \"simplification\") ganz viel Triviales vereinfachen. +-- `simp` ist eine der stärksten Taktiken in Lean und verwendet +-- ganz viele markierte Lemmas um das Goal zu vereinfachen. + +-- Zum Beispiel kennt es ein Lemma das ungefähr so aussieht: + +-- ``` +-- @[simp] +-- lemma sum_const_add (n : ℕ) : (∑ i in Fin n, 0) = 0 := by +-- sorry +-- ``` + +-- Die Taktik `simp` benützt alle Lemmas, die mit `@[simp]` markiert sind. + +-- (Tipp: `simp?` zeigt an, welche Lemmas `simp` benutzen würde.) + +open BigOperators + +Statement (n : ℕ) : (∑ i : Fin n, (0 + 0)) = 0 := by + Hint "BUG" + + -- TODO (Bug): Invalid escape sequence: + -- "**Du**: Oh das ist ganz schön viel neues… Mal sehen, das sagt wohl + -- $( \\sum_i 0 + 0 ) = 0$. Dann ist das vielleicht doch nicht so komplex. + + -- **Robo**: Genau! Man schreibt `\\sum`. Beachte den Index: + -- $( \\sum_\{i=0}^\{n-1} 0 + 0 ) = 0$, also `Fin n` ist ein Typ mit den Elementen + -- $\\{0, \\ldots, n-1\\}$. + + -- **Du**: Oke, also `Fin n` hat `n` Elemente. Und was mach ich jetzt? + + -- **Robo**: `simp` ist eine ganz starke Taktik, die viele Terme vereinfacht, wir + -- fangen besser an, diese zu benützen. + + -- Irgendwie hast du das Gefühl ein Déjà-vue zu haben…" + simp + +OnlyTactic simp + +Conclusion "**Unbekannte**: Sehr gut, folgt mir!" diff --git a/server/adam/Adam/Levels/Sum/L02_Sum.lean b/server/adam/Adam/Levels/Sum/L02_Sum.lean new file mode 100644 index 0000000..65a3ad0 --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L02_Sum.lean @@ -0,0 +1,54 @@ +import Adam.Metadata + +import Adam.ToBePorted +import Mathlib + +set_option tactic.hygienic false + +Game "Adam" +World "Sum" +Level 2 + +Title "endliche Summe" + +Introduction +" +Während euch die Person zu einem besonders herausragenden Steinturm führt, löchert +sie euch noch weiter mit Fragen. +" + +open BigOperators + +Statement + "$\\sum_{i=0}^{n-1} (i + 1) = n + \\sum_{i=0}^{n-1} i$." + (n : ℕ) : ∑ i : Fin n, ((i : ℕ) + 1) = n + (∑ i : Fin n, (i : ℕ)) := by + -- Hint "**Du**: Hmm, wieder `simp`? + + -- **Robo**: Nicht ganz. `simp` benützt nur Lemmas, die klar eine Vereinfachung darstellen, + -- und in deiner Bibliothek mit `@[simp]` markiert wird. Hier brauchen wir eine andere + -- Umformung: + + -- $$ + -- \\sum_\{i = 0}^n a_i + b_i = \\sum_\{i = 0}^n a_i + \\sum_\{j = 0}^n b_j + -- $$ + + -- **Robo*: Da unklar ist, welche Seite \"einfacher\" ist, wird so ein Lemma nicht mit + -- `@[simp]` markiert. Das heisst du musst `Finset.sum_add_distrib` mit `rw` + -- explizit anwenden. + -- " + rw [Finset.sum_add_distrib] + Hint "**Robo**: Die zweite Summe `∑ x : Fin n, 1` kann jetzt aber mit + `simp` zu `n` vereinfacht werden." + simp + Hint "**Robo**: Bis auf Umordnung sind jetzt beide Seiten gleich! + + **Du**: Dann greift jetzt wohl `ring`! + + **Robo**: Genau! Und alternativ könntest du mit `rw [add_comm]` die Arbeit von `ring` + auch manuell machen." + ring + +NewLemma Finset.sum_add_distrib add_comm + +Conclusion "Eure Begleitung scheint mit der Antwort zu frieden zu sein und zeigt +freudig an dem Turm empor, den ihr soeben erreicht habt." diff --git a/server/adam/Adam/Levels/Sum/L03_ArithSum.lean b/server/adam/Adam/Levels/Sum/L03_ArithSum.lean new file mode 100644 index 0000000..c87d95e --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L03_ArithSum.lean @@ -0,0 +1,89 @@ +import Adam.Metadata + +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Tactic.Ring + +import Adam.ToBePorted + +set_option tactic.hygienic false + +Game "Adam" +World "Sum" +Level 3 + +Title "Arithmetische Summe" + +Introduction +" +**Du**: Wie werden solche Meisterwerke eigentlich gebaut? + +Da zeigt eure Begleitung auf eine kleine Steinplatte neben dem Eingang, +auf der eien Beschreibung gekritzelt ist. + +**Robo**: Das ist wohl der bekannte arithmetische Turm von Indu, über den hab ich schon +einmal Daten verarbeitet. Und die antwort auf deine Frage: Vermutlich ein Stein nach +dem anderen. +" + +open BigOperators + +Statement arithmetic_sum + "$2 \\cdot \\sum_{i = 0}^n i = n \\cdot (n + 1)$." + (n : ℕ) : 2 * (∑ i : Fin (n + 1), ↑i) = n * (n + 1) := by + Hint "**Du**: Klar, die werden ja nicht oben anfangen mit bauen. Sag mal, + wie zeige ich denn die arithmetische Summe, die hier gekritzelt steht? + Ich würde gerne Induktion über $n$ anwenden. + + **Robo**: Ja dann ist's einfach `induction n`, ist doch logisch!" + induction n + Hint "**Du**: Zuerst den Induktionsanfang… + + **Robo**: Diesen kannst du oft mit `simp` abkürzen!" + simp + Hint "**Robo**: Jetzt im Induktionsschritt: Bei Induktion über endlichen Summen willst du + immer mit `rw [Fin.sum_univ_castSucc]` anfangen" -- : + + -- $$\\sum_\{i=0}^n a_i = \\sum_{i=0}^\{n-1} a_i + a_n$$" + rw [Fin.sum_univ_castSucc] + -- TODO: Bug. Dieser Hint wird nicht angezeigt. + Hint "**Du**: Oh das sieht jetz aber kompliziert aus… + + **Robo**: Da musst du etwas drüber hinweg lesen. Am besten machst du kurz `simp`, + dann sieht's schon wieder besser aus." + simp + Hint "**Du**: Was bedeutet eigentlich der kleine Pfeil `↑`? + + **Robo**: Das ist eine *Coersion*. Sowas wie wenn man eine natürliche Zahl als Integer anschaut, + also die natürliche Abbildung `ℕ ↪ ℤ`. Oder hier, wenn ein Element `x : Fin n` stattdessen als + Element in `(↑x : ℕ)` angeschaut wird. + + **Robo**: Übrigens, um die Induktionshypothese anzuwenden brauchst du zuerst das Lemma + `mul_add`." + rw [mul_add] + Hint "**Du**: Und wie wende ich jetzt die Induktionshypothese an? + + **Robo mit `rw` wie jede andere Annahme auch." + rw [n_ih] + Hint "**Robo**: Jetzt musst du noch kurz `rw [Nat.succ_eq_add_one]` anwenden. + + **Du**: Aber wieso? + + **Robo**: Naja, `ring` ist jetzt auch noch nicht so stark, und erkennt nicht dass `n.succ` + und `n + 1` das gleiche sind. + + **Du**: Aber das könnte man doch ändern, oder? + + **Robo**: Vielleicht wenn wir einmal einem Techniker begegnen, der mir ein Update + einspielen kann…" + Branch + ring_nf + Hint "**Robo**: Wie gesagt, brauch doch `rw [Nat.succ_eq_add_one]` als Fix für meine + kleinen Maken." + rw [Nat.succ_eq_add_one] + ring + +NewTactic induction +NewLemma Fin.sum_univ_castSucc Nat.succ_eq_add_one mul_add add_mul Nat.zero_eq + +Conclusion "Du schaust dich um und bewunderst das Tal in dem hunderte, wenn nicht tausende, +Steintürme in allen Formen und Höhen stehen." diff --git a/server/adam/Adam/Levels/Sum/L04_SumOdd.lean b/server/adam/Adam/Levels/Sum/L04_SumOdd.lean new file mode 100644 index 0000000..d84dd40 --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L04_SumOdd.lean @@ -0,0 +1,33 @@ +import Adam.Metadata + +import Adam.ToBePorted +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Tactic.Ring + +Game "Adam" +World "Sum" +Level 4 + +Title "Summe aller ungeraden Zahlen" + +Introduction +" +**Du**: Haben eigentlich alle Türme hier so kryptische Beschreibungen am Eingang? + +Du gehst zu einem etwas kleineren Nachbarsturm. +" +set_option tactic.hygienic false + +open BigOperators + +Statement odd_arithmetic_sum + "$\\sum_{i = 0}^n (2n + 1) = n ^ 2$." + (n : ℕ) : (∑ i : Fin n, (2 * (i : ℕ) + 1)) = n ^ 2 := by + Hint "**Robo**: Das funktioniert genau gleich wie zuvor, viel Glück." + induction n + simp + rw [Fin.sum_univ_castSucc] + simp + rw [n_ih] + rw [Nat.succ_eq_add_one] + ring diff --git a/server/adam/Adam/Levels/Sum/L05_SumComm.lean b/server/adam/Adam/Levels/Sum/L05_SumComm.lean new file mode 100644 index 0000000..dd5cc37 --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L05_SumComm.lean @@ -0,0 +1,49 @@ +import Adam.Metadata + +import Adam.ToBePorted +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Tactic.Ring + +import Adam.Options.ArithSum + +set_option tactic.hygienic false + +open BigOperators + +Game "Adam" +World "Sum" +Level 5 + +Title "Summe vertauschen" + +Introduction +" +Nun aber zeigt euch eure Begleiterin zwei weitere Türme mit einer kleinen Brücke, die +zwischen den beiden verläuft. Die Tafel am Eingang wurde von einem herunterfallenden Stein +zerstört. Auf der oberen Hälfte steht nur folgendes: + +$$\\sum_{i=0}^n\\sum_{j=0}^m a_{ij} = \\sum_{j=0}^m\\sum_{i=0}^n a_{ij}$$ + +**Du**: Ich glaube, ich kann das in eurem Dialekt formulieren und euch damit helfen! +" + + +Statement +(n m : ℕ) : ∑ i : Fin n, ∑ j : Fin m, ( 2^i * (1 + j) : ℕ) = + ∑ j : Fin m, ∑ i : Fin n, ( 2^i * (1 + j) : ℕ) := by + Hint "**Robo**: Das sieht gut aus, aber du solltest das kurz beweisen, um sicher zu sein. + + **Du**: Hast du nicht ein Lemma dafür? + + **Robo**: Doch, probier mal `Finset.sum_comm`." + rw [Finset.sum_comm] + +NewLemma Finset.sum_comm + +Conclusion " + Euer Begleiter ist ganz begeistert als er dir das Stück Papier aus den Händen nimmt, + auf dem du die Aussage gekritzelt hast. Gleich zückt sie einen Meißel und beginnt eine + neue Platte zu erstellen. + + Ihr winkt ihr noch zum Abschied und geht weiter. +" diff --git a/server/adam/Adam/Levels/Sum/L06_Summary.lean b/server/adam/Adam/Levels/Sum/L06_Summary.lean new file mode 100644 index 0000000..45f2a13 --- /dev/null +++ b/server/adam/Adam/Levels/Sum/L06_Summary.lean @@ -0,0 +1,92 @@ +import Adam.Metadata + +import Adam.ToBePorted +import Mathlib.Algebra.BigOperators.Fin +import Mathlib.Tactic.Ring + +import Adam.ToBePorted +import Adam.Options.ArithSum + +Game "Adam" +World "Sum" +Level 6 + +set_option tactic.hygienic false + +Title "Zusammenfassung" + +Introduction +" +**Du**: Robo gib mir nochmals eine Übersicht, bitte. + +**Robo**: Aber klar: + +| | Beschreibung | +|:---------------------|:------------------------------------------| +| `Fin n` | Ist ein Typ mit Zahlen $0, \\ldots, n-1$. | +| `∑ (i : Fin n), a i` | $\\sum_{i=0}^{n-1} a_i$ | +| `↑i` | Eine Coersion, z.B. `Fin n → ℕ`. | + +und + +| | Taktik | Beispiel | +|:---|:--------------------------|:-------------------------------------| +| 21 | `simp` | Simplifikation. | +| 22 | `induction n` | Induktion über $n$ | + +Da löst sich aus der Steinlandschaft plötzlich ein grosser Steingolem. Er schaut euch +bedrohlich an und fragt in tiefer Stimme: +" + +open BigOperators + +Statement (m : ℕ) : (∑ i : Fin (m + 1), (i : ℕ)^3) = (∑ i : Fin (m + 1), (i : ℕ))^2 := by + Hint "**Du**: Gulp. Naja das wird schon klappen. Also man fängt wieder mit Induktion an…" + induction m + Hint "**Du**: Also den Induktionsanfang kann man einfach zeigen…" + simp + Hint "**Robo**: Und jetzt wieder `rw [Fin.sum_univ_castSucc]` und `simp` um vorwärts zu + kommen!" + rw [Fin.sum_univ_castSucc] + simp + Hint "**Robo**: Siehst du die Induktionshypothese hier drin?" + rw [n_ih] + Hint "**Du**: Ok, damit habe ich die linke Seite der Gleichung ziemlich gut bearbeitet. + Aber, ehm, mit der Rechten komme ich nicht weiter… + + Der Golem schaut dich finster an. + + **Robo**: Du willst `Fin.sum_univ_castSucc` auf der rechten Seite anwenden, aber es + gibt mehrere Orte, wo das Lemma passen würde. + Deshalb musst du mit `rw [Fin.sum_univ_castSucc (n := {n} + 1)]` angeben, wo genau. + + **Du**: Was bedeutet das? + + **Robo** Das Lemma hat eine Annahme `n` und du sagst ihm explizit, was es für dieses `n` + einsetzen muss, nämlich `{n} + 1`" + Branch + rw [Fin.sum_univ_castSucc] + Hint "**Robo**: Das hat jetzt einfach `Fin.sum_univ_castSucc` am ersten Ort angewendet, + wo das möglich war. Das ist nicht so ideal, die like Seite war schon okay. + + **Robo**: Geh doch zurück und bring `rw` dazu am anderen Ort umzuschreiben." + rw [Fin.sum_univ_castSucc (n := n + 1)] + simp + Hint "**Robo**: `add_pow_two` ist auch noch nützlich!" + rw [add_pow_two] + Hint "**Du**: Ich glaube, ich sehe hier ne arithmetische Summe drin!! + + **Robo**: Ich habe dir das dies von vorhin temporär als `arithmetic_sum` gespeichert, + damit du diese brauchen kannst." + rw [arithmetic_sum] + Hint "**Du**: Jetzt sollten es eigentlich nur noch arithmetische Operationen sein." + ring + +NewLemma arithmetic_sum add_pow_two + +Conclusion "Der Golem denkt ganz lange nach, und ihr bekommt das Gefühl, dass er gar nie +aggressive war, sondern nur eine sehr tiefe Stimme hat. + +Mit einem kleinen Erdbeben setzt er sich hin und winkt euch dankend zu. + +Damit zieht ihr weiter durch die karge Landschaft auf diesem Planet." diff --git a/server/testgame/TestGame/Levels/Sum/T01_Induction.lean b/server/adam/Adam/Levels/Sum/T01_Induction.lean similarity index 83% rename from server/testgame/TestGame/Levels/Sum/T01_Induction.lean rename to server/adam/Adam/Levels/Sum/T01_Induction.lean index 1e2c033..24062ab 100644 --- a/server/testgame/TestGame/Levels/Sum/T01_Induction.lean +++ b/server/adam/Adam/Levels/Sum/T01_Induction.lean @@ -1,13 +1,13 @@ -import TestGame.Metadata +import Adam.Metadata -import TestGame.Options.BigOperators +import Adam.ToBePorted import Mathlib.Algebra.BigOperators.Fin set_option tactic.hygienic false open Nat -Game "TestGame" +Game "Adam" World "Sum" Level 2 @@ -36,5 +36,3 @@ example (n : ℕ) (h : 5 ≤ n) : n^2 < 2 ^ n | 0 | 1 | 2 | 3 | 4 => by sorry | n + 5 => by sorry - -NewTactic rw simp ring diff --git a/server/testgame/TestGame/Levels/Sum/T02_Induction.lean b/server/adam/Adam/Levels/Sum/T02_Induction.lean similarity index 85% rename from server/testgame/TestGame/Levels/Sum/T02_Induction.lean rename to server/adam/Adam/Levels/Sum/T02_Induction.lean index aa25628..09f6400 100644 --- a/server/testgame/TestGame/Levels/Sum/T02_Induction.lean +++ b/server/adam/Adam/Levels/Sum/T02_Induction.lean @@ -1,11 +1,11 @@ -import TestGame.Metadata +import Adam.Metadata -import TestGame.Options.BigOperators +import Adam.ToBePorted import Mathlib.Algebra.BigOperators.Fin set_option tactic.hygienic false -Game "TestGame" +Game "Adam" World "Sum" Level 2 @@ -32,4 +32,3 @@ Statement -- ring -- rw [Nat.succ_eq_one_add] -- rw [] -NewTactic rw simp ring diff --git a/server/testgame/TestGame/Levels/Sum/T03__Bernoulli.lean b/server/adam/Adam/Levels/Sum/T03__Bernoulli.lean similarity index 88% rename from server/testgame/TestGame/Levels/Sum/T03__Bernoulli.lean rename to server/adam/Adam/Levels/Sum/T03__Bernoulli.lean index 003a584..0c73287 100644 --- a/server/testgame/TestGame/Levels/Sum/T03__Bernoulli.lean +++ b/server/adam/Adam/Levels/Sum/T03__Bernoulli.lean @@ -1,12 +1,12 @@ -import TestGame.Metadata +import Adam.Metadata -import TestGame.Options.BigOperators +import Adam.ToBePorted import Mathlib.Algebra.BigOperators.Fin import Mathlib.Tactic.Ring -import TestGame.ToBePorted +import Adam.ToBePorted -Game "TestGame" +Game "Adam" World "Sum" Level 5 diff --git a/server/testgame/TestGame/Metadata.lean b/server/adam/Adam/Metadata.lean similarity index 63% rename from server/testgame/TestGame/Metadata.lean rename to server/adam/Adam/Metadata.lean index a9fd86a..e0f2b52 100644 --- a/server/testgame/TestGame/Metadata.lean +++ b/server/adam/Adam/Metadata.lean @@ -1,4 +1,4 @@ import GameServer.Commands -import TestGame.TacticDocs -import TestGame.LemmaDocs +import Adam.TacticDocs +import Adam.LemmaDocs import Mathlib.Init.Data.Nat.Basic -- Imports the notation ℕ. diff --git a/server/testgame/TestGame/Options/ArithSum.lean b/server/adam/Adam/Options/ArithSum.lean similarity index 100% rename from server/testgame/TestGame/Options/ArithSum.lean rename to server/adam/Adam/Options/ArithSum.lean diff --git a/server/testgame/TestGame/Playground.lean b/server/adam/Adam/Playground.lean similarity index 100% rename from server/testgame/TestGame/Playground.lean rename to server/adam/Adam/Playground.lean diff --git a/server/adam/Adam/StructInstWithHoles.lean b/server/adam/Adam/StructInstWithHoles.lean new file mode 100644 index 0000000..0921856 --- /dev/null +++ b/server/adam/Adam/StructInstWithHoles.lean @@ -0,0 +1,1698 @@ +/- Copied from `https://github.com/leanprover-community/mathlib4/tree/thorimur/refine_struct-via-StructInst` -/ + +/- +Copyright (c) 2020 Microsoft Corporation. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Leonardo de Moura +-/ +import Lean.Util.FindExpr +import Lean.Parser.Term +import Lean.Meta.Structure +import Lean.Elab.App +import Lean.Elab.Binders + +set_option autoImplicit true + +/-! + # Structure Instances With (Variadic) Holes + This file defines a term elaborator for structure instance syntax that includes "variadic holes", + i.e. holes of "variable length", which are represented via via the syntax `?..`, `?..!`, etc., + e.g. `{ x := 0, ?.. }`. + This serves to port the functionality of mathlib3's `refine_struct { .. }`, but via `refine` + (e.g. `refine { ?.. }`). + Lean currently already supports one form of variadic hole in structure instances, namely `..`, + which fills all unspecified fields with natural metavariables and which is frequently used in + pattern matching. + Variadic holes that begin with a question mark are meant to parallel named holes (e.g. `?x`). + Therefore, syntax like `{ x := 0, ?.. }` will fill all remaining fields with metavariables named + by the field in question (e.g. `y := ?y`). Identifiers can optionally be provided to prefix the + name; see below. + Tests are performed in `Tests/StructInstWithHoles.lean`. + At the end of this file, we implement `haveFieldProj` in analogy to `have_field` with some + modifications. (This might be moved or eliminated.) + ## Current specifics + The following is subject to change. + Several variants are supported to enable the choice between synthetic holes (`?`) and natural + ones, and to enable the choice between filling all unspecified fields with holes (`!`) and + synthesizing defaults where possible. + Currently only three combinations are allowed, since I can't see a use for unnamed/natural goals + with synthesized defaults. More descriptive syntax might be used for indicating whether to + synthesize defaults or not (e.g. `?.. noDefaults`) + synthesize defaults + ┌──true──┬─false──┐ + named goals │ `?..` │ `?..!` │ + ├────────┼────────┤ + unnamed goals │ × │ `..` │ + └────────┴────────┘ + Identifiers can be provided after the variadic hole syntax in the `?` case, e.g. `?..foo` and + `?..!foo`. These will be prefixed to the goal name. For example, a field `y`'s goal will be named + `foo.y` instead of `y`. + # Overview of existing code + This document began as `StructInst.lean`, then was modified as needed. The modifications are done + in such a way as to (hopefully) make it easy for them to be absorbed into `StructInst.lean`, if + that's where it ends up. The following details how the original `StructInst.lean` works (which is + largely preserved). + ## Short version + The way this works is that we start with syntax, parse it into a bare-bones `Struct`, use + `expandStruct` to expand that struct into another struct that has intermediate indicators + (`FieldVal`s) holding raw syntax or accounting for its absence. We then `elabStruct` that struct + into an `ElabStructResult` which has the potential result expression (an application of the + structure's single constructor to its values, which may be metavariables if they weren't found in + the syntax) plus info on the original struct. We then synthesize defaults using `propagate` to + assign any metavariables standing in for default values, and then return the expression. + ## Long version + We start with turning the syntax into a struct. First we extract the sources (everything before + the `with` and any variadic holes (`..` or similar)), then we feed this to `elabStructInstAux` + along with the raw syntax and expected type. Inside `elabStructInstAux` we make the syntax into a + Struct (`mkStructView`), then `expandStruct`. + There's a "pre-expression scaffolding/framework/spine" set up early on in the process in the form + of FieldVal's, which hold raw information: `.term stx` where `stx` is syntax, if a term was + provided; a `.missing` value if it was missing; or a `.nested s` value where `s` is a `Struct` if + a subobject relation obtains. The `FieldVal`s for a field might be modified as elaboration + proceeds: for example, some might become `.nested`, or some defaults might turn into terms. This + all happens during `expandStruct`. + The `Struct` holds everything, and is updated throughout the process. + One of its fields is `field`, which holds a list of `Field Struct`'s. (The appearance of `Struct` + within `Field Struct` is to allow the `Struct`s to nest other `Struct`s when we have subobjects.) + The fields of each element of the `field` field (got that?) are + * `ref : Syntax`, which holds the `Syntax` found for that field + * `lhs : FieldLHS`, which describes the name of the field in question + * `val : FieldVal`, which holds the pre-expression `FieldVal`—either `.term stx` where `stx` is + the syntax of the field's value, `.default` (now `.missing`) if no syntax was found, or `.nested + s` if the field represents a subobject `s` of the structure (e.g. `toFoo`, produced by `extends`) + * `expr? : Option Expr`, which holds the elaborated expression when it becomes available (or a + metavariable, if the syntax is missing), and which begins at this stage as `none`. + `elacStructInstAux` then calls `elabStruct` on the skeletal `Struct` (which has appropriate + `FieldVal`s, but `none` for each field's `expr?`), which turns the `Struct` into an + `ElabStructResult`. + `elabStruct` elaborates everything but defaults, constructing the structure instance as an + expression given by the application of the structure's constructor to the values it finds by + elaborating the `stx` in any `.term stx` `FieldVal` while ensuring the appropriate type. (It's + not quite true that no defaults are taken care of here: `autoparam`s are turned into `.term`s.) + If the `FieldVal` is `.nested s`, it calls `elabStruct` on `s`; if it finds a `.default` (now + renamed to `.missing`) `FieldVal`, it uses a fresh metavariable in place of an elaborated + expression. As it does this, it stores any elaborated expressions in the `expr?` field of its + fields and builds this constructor application expression, which is, in the resulting + `ElabStructResult` structure, confusingly also named "val". Occasionally the `FieldVals` for each + field are updated as well. Also returned in `ElabStructResult` is the updated Struct with all its + new fields, and `instMVars`, an array of metavariables for dealing with typeclass instance + synthesis. + During `elabStruct`, defaults were inserted as metavariables into the constructed expression and + into `expr?`, but they were also annotated with ``structInstDefault` to indicate that they + represented a missing default value, and needed to be synthesized during the default loop. + Indeed, the function `isMissingDefault?` checks that this metavariable is unassigned when + deciding whether to return true or false. We finish our elaboration of the structure instance + with the `propagate` loop, which iteratively synthesizes the defaults, as sometimes the default + values of fields reference other fields which may also have a default value (etc.). + # Modifications + Changes from `StructInst.lean` are no longer marked with `!!` in a comment (or with `!!/`, `!!\` + surrounding a new or altered block). These are however visible in past commits. + Existing comments are left unchanged, and new comments begin with "~~". + ## Syntax + We use the parser from `Term.lean`, but change `optional ".."` to our parseer for variadic holes, + `variadicHole` + ## Logic + The original implementation of `..`, which creates a natural metavariable for each goal (and does + not synthesize defaults) affects things early on, at the stage of `FieldVal`s. Instead of using a + `.default` `FieldVal`, it makes a hole via syntax by providing a `.term (mkHole ref)` `FieldVal` + for each missing field value. + We preserve this behavior only for the `isSynthetic := false, useDefaults := false` case. + Otherwise, we use the `.default` `FieldVal`—now renamed to `.missing` to reflect its changed + function—and intervene mostly within the `ImplicitFields` namespace (previously the + `DefaultFields` namespace), where defaults are synthesized. If the variadic hole syntax says not + to, we don't propagate the default-synthesizing loop and therefore don't synthesize any defaults. + Typically, when the default loop ends with some fields still annotated as missing, an error is + thrown (`fields missing: ...`). However, if there's a variadic hole, we simply return from the + loop without error; next (whether the loop has run or not) we assign those remaining annotated + fields to *new* metavariables, which, in the `isSynthetic := true` case, are well-named and hold + all of the metadata we want them to. These are ripe to be used in a `refine` statement. + The only exception to this flow is how we handle `autoparam`s: autoparams are handled in + `elabStruct`, so that's where we intervene as well. + ## Style + New code is often written in a "lookahead" fashion, to make it as easy as possible to move this + to core, in case it would better belong there. Therefore some cases that don't occur in this + elaboration are nonetheless accounted for—for example, the case where variadic hole syntax is + absent (where the value of struct.source.implicit is none), and the case where `isSynthetic := + false, useDefaults := false`, which is already accounted for by existing `..` syntax. We use a + different token (`...`) only to show that this works. + This modification of `StructInst.lean` also attempts to be "minimally invasive" by intervening in + as few places as possible and leaving the existing flow of computation intact. + ## Locations of changes + The changes to existing definitions are localized to the following: + ### Necessary parsing and syntax processing changes + * The `structInst` term parser was modified to allow variadic hole syntax. + * `expandStructInstFieldAbbrev` + * update `$[..%$ell]?` syntax match to accommodate variadic holes + * type of `implicit` in `Source` structure: `Option Syntax` ⇒ `Option VariadicHoleConfig` + * originally this held the syntax `..` if present; now it holds information derived from the + variadic hole syntax (if present) as opposed to the raw syntax + * `getStructSource` + * inserted `getVariadicHoleConfig?` in front of the raw `implicitSource` syntax to process it + into a `VariadicHoleConfig` + * `formatStruct` + * instead of using a literal `".."` whenever `implicit.isSome`, use the syntax we encountered + (stored as one of the fields of `VariadicHoleConfig`) + ### Logic + **Simple renamings** + * The `.default` `FieldVal`, which was used to indicate that fields would be synthesized by the + default loop, is renamed to `.missing` for clarity. Likewise `Struct.allDefault` is renamed to + `Struct.allMissing` (since it simply checks these `FieldVal`s), and `formatField` formats + `.missing` fields via `""` instead of via `""`. + * We rename the `DefaultFields` namespace to `ImplicitFields`, since this is now where we + intervene to handle holes as well. + **Setup changes** + * `addMissingFields`, which is responsible for attaching `.missing` to unspecified fields, + previously attached a `.term (mkHole stx)` to any missing field whenever `..` was present. Here, + we only do so in the `isSynthetic := false, useDefaults := false` case, attaching `.missing` in + all other cases (both when we exepct them to be synthesized as defaults and not). + * `elabStruct` – this function uses `FieldVal`s to 1) generate `expr?`s for each field when + possible and 2) apply the structure's constructor to the arguments it finds to build the instance + expression. It stops short of synthesizing defaults, inserting a metavariable in both places when + it encounters a `.missing` field. However, autoparams for `.missing` values are handled here. We + therefore modify that section of the code so that + * if the variadic hole says to use holes instead of defaults, we don't try the autoparam + * if it says to use defaults, we try the autoparam in such a way that if it fails we use a hole + instead + * we also need to introduce a new optional `Bool` argument to the internal `cont` function + that, when modified from its default, takes a different branch. Otherwise `cont` is + untouched, and the original behavior is used when this argument is not specified. + * if there's no variadic hole, use the original behavior + **Default loop changes** + * `propagateLoop` – this is a pass of the loop used for synthesizing defaults, and is responsible + for throwing an error when too few fields are specified. If there is a variadic hole, it does not + throw that error and simply returns. + * `propagate` – this sets things up for the loop and executes it. + * We check the variadic hole config and don't run `propagateLoop` if it says not to. (We start + with a `do` to accommodate this.) + * At the end, if there is a variadic hole, we run `assignRemainingDefaultsToFieldHoles` (a new + function which does what you expect) + ## New Code + The new functionality is in the `ImplicitFields` section to attach metadata to the goals + produced. Currently, we attach the metadata as a `KVMap` to the type of the goal, but this may + change. We use this metadata to resolve name conflicts, appending an appropriate index if any + existing metavariable is from a structure that shares a field name. This is meant to improve + clarity: for example, if `Foo` and `Bar` both have fields `x` and `y`, + `refine ({ y := 0, ?.. : Foo}, { x := 1, ?.. : Bar})` will produce goals `x` and `y_1` to show + that these are not from the same structure. (This may change if we decide to prefix each goal + name with the name of the structure.) + # Questions + * Should `trySynthStructInstance?` be run even when `useDefaults` is `false`? + * what about `bi == .instImplicit`? Should default synthesis be avoided in that case too? + * Dhould metadata be on the type, or somewhere else? + * Is the best way to get a unique id for a syntax instance via getPos? Do we need to do so anyway? + * Should utility-like functions be refactored into other files? + * Can the docstrings of the original structure instance and `refine` be modified from "within + mathlib" somehow? + * Do I need to add to "authors" at the top or worry about the copyright? + * Check for unreachable code after design decisions have been made. +-/ +namespace Lean.Elab.Term.StructInstWithHoles + +open Meta +open TSyntax.Compat + +/-- + A synthetic variadic hole. When used in structure instance syntax, it fills the unspecified + fields with metavariables named by the field. It synthesizes defaults when possible. + It can be followed by an identifier to specify a prefix for the names of the holes. + -/ +def vH?dd := leading_parser "?.." >> Parser.optional Parser.ident +/-- + A synthetic variadic hole that does not synthesize any defaults. When used in structure instance + syntax, it fills the unspecified fields with metavariables named by the field. It synthesizes + defaults when possible. It can be followed by an identifier to specify a prefix for the names of + the holes. + -/ +def vH?dd! := leading_parser "?..!" >> Parser.optional Parser.ident +/-~~! Removed for now. +/-- A natural variadic hole that does not synthesize defaults. -/ +def vHdd! := leading_parser "..!" +/-- A natural variadic hole that synthesizes defaults when possible. -/ +def vHdd := leading_parser "..." +-/ +/-- A variadic hole that fills multiple spots with holes. -/ +def variadicHole := leading_parser (vH?dd <|> vH?dd! /-~~! <|> vHdd! <|> vHdd-/) + +open Lean.Parser Lean.Parser.Term in +/-- +Structure instance. `{ x := e, ... }` assigns `e` to field `x`, which may be +inherited. If `e` is itself a variable called `x`, it can be elided: +`fun x => { x , y := 1 }`. +A *structure update* of an existing value can be given via `with`: +`{ point with x := 1 }`. +The structure type can be specified if not inferable: +`{ x := 1, y := 2 : Point }`. +`..` can be used in pattern-matching to fill all unspecified fields with `_`: +`match s with | { x := 1, .. } => ...` +`?..` fills all unspecified fields with automatically-named goals: +if a `Foo` has fields `x`, `y`, `z`, `{ x := 1, ?.. } : Foo` creates `?y`, `?z`. +-/ +@[term_parser] def structInstWithHoles := leading_parser "{" >> ppHardSpace >> Lean.Parser.optional +(atomic (sepBy1 termParser ", " >> " with ")) + >> sepByIndent (structInstFieldAbbrev <|> structInstField) ", " (allowTrailingSep := true) + >> variadicHole -- Only apply this elaboration to syntax that has one of these holes + >> Lean.Parser.optional (" : " >> termParser) >> " }" + +/-- + Syntactically move any type specification outside of the structure instance syntax: + `{ x := 0 : Foo }` becomes `{ x := 0 } : Foo`. +-/ +@[macro structInstWithHoles] def expandStructInstWithHolesExpectedType : Macro := fun stx => + let expectedArg := stx[4] + if expectedArg.isNone then + Macro.throwUnsupported + else + let expected := expectedArg[1] + let stxNew := stx.setArg 4 mkNullNode + `(($stxNew : $expected)) + +/-- Expand field abbreviations. Example: `{ x, y := 0 }` expands to `{ x := x, y := 0 }` -/ +@[macro structInstWithHoles] def expandStructInstWithHolesFieldAbbrev : Macro + | `({ $[$srcs,* with]? $fields,* $ell:variadicHole $[: $ty]? }) => + if fields.getElems.raw.any (·.getKind == ``Lean.Parser.Term.structInstFieldAbbrev) then do + let fieldsNew ← fields.getElems.mapM fun + | `(Parser.Term.structInstFieldAbbrev| $id:ident) => + `(Parser.Term.structInstField| $id:ident := $id:ident) + | field => return field + `({ $[$srcs,* with]? $fieldsNew,* $ell $[: $ty]? }) + else + Macro.throwUnsupported + | _ => Macro.throwUnsupported + +/-- + If `stx` is of the form `{ s₁, ..., sₙ with ... }` and `sᵢ` is not a local variable, expand into + `let src := sᵢ; { ..., src, ... with ... }`. + Note that this one is not a `Macro` because we need to access the local context. +-/ +private def expandNonAtomicExplicitSources (stx : Syntax) : TermElabM (Option Syntax) := do + let sourcesOpt := stx[1] + if sourcesOpt.isNone then + return none + else + let sources := sourcesOpt[0] + if sources.isMissing then + throwAbortTerm + let sources := sources.getSepArgs + if (← sources.allM fun source => return (← isLocalIdent? source).isSome) then + return none + if sources.any (·.isMissing) then + throwAbortTerm + return some (← go sources.toList #[]) +where + go (sources : List Syntax) (sourcesNew : Array Syntax) : TermElabM Syntax := do + match sources with + | [] => + let sources := Syntax.mkSep sourcesNew (mkAtomFrom stx ", ") + return stx.setArg 1 (stx[1].setArg 0 sources) + | source :: sources => + if (← isLocalIdent? source).isSome then + go sources (sourcesNew.push source) + else + withFreshMacroScope do + let sourceNew ← `(src) + let r ← go sources (sourcesNew.push sourceNew) + `(let src := $source; $r) + +/-- Information for any explicit sources encountered (i.e. some `sᵢ` in `s₁, ..., sₙ with`) -/ +structure ExplicitSourceInfo where + /-- The syntax of some `sᵢ` in `s₁, ..., sₙ with` -/ + stx : Syntax + /-- The name of some structure `sᵢ` in `s₁, ..., sₙ with` -/ + structName : Name + deriving Inhabited + +/-- + Information deduced from variadic hole syntax, as well as the raw + syntax itself and any identifiers that were found. +-/ +structure VariadicHoleConfig where + /-- The raw variadic hole syntax encountered (`?..`, `..`, etc.)-/ + stx : TSyntax ``variadicHole + /-- An optional name `x` found in `?..x` or `?..!x`, to be used as a prefix. -/ + name : Option Name := none + /-- Whether the holes should be synthetic and automatically named. -/ + isSynthetic : Bool + /-- Whether defaults should attempt to be synthesized before filling fields with holes. -/ + useDefaults : Bool + deriving Inhabited, Repr + +/-- + Information on other sources of field values via structure update syntax or variadic holes. + Collects of explicit source info (preceding `with` in structure updates) and implicit source + info (for specification of holes, e.g. `..` or `?..`). +-/ +structure Source where + /-- info for all `sᵢ` in `s₁, ..., sₙ with` -/ + explicit : Array ExplicitSourceInfo + /-- info for any variadic hole syntax encountered (`?..`, `..`, etc.) -/ + implicit : Option VariadicHoleConfig + deriving Inhabited + +/-- Check if neither an explicit nor an implicit source has been specified. -/ +def Source.isNone : Source → Bool + | { explicit := #[], implicit := none } => true + | _ => false + +/-- Process variadic hole syntax into a VariadicHoleConfig. -/ +def getVariadicHoleConfig? : TSyntax ``variadicHole → Option VariadicHoleConfig +| stx => match stx with + | `(variadicHole|?..$[$x:ident]?) => some + {stx, isSynthetic := true, useDefaults := true, name := x.map Syntax.getId} + | `(variadicHole|?..!$[$x:ident]?) => some + {stx, isSynthetic := true, useDefaults := false, name := x.map Syntax.getId} + | _ => none + +/-- + Put an array of source syntax into a form which matches + `optional (atomic (sepBy1 termParser ", " >> " with ")`, e.g. `s₁, s₂, s₃ with`. + Should only be called when `sources` is a nonempty `Array`. + -/ +private def mkSourcesWithSyntax (sources : Array Syntax) : Syntax := + let ref := sources[0]! + let stx := Syntax.mkSep sources (mkAtomFrom ref ", ") + mkNullNode #[stx, mkAtomFrom ref "with "] + +/-- + Extract and process both explicit (`s₁, ..., sₙ with`) and implicit (`..`, `?..`, etc.) source + syntax from structure syntax. +-/ +private def getStructSource (structStx : Syntax) : TermElabM Source := + withRef structStx do + let explicitSource := structStx[1] + let implicitSource := structStx[3] + let explicit ← if explicitSource.isNone then + pure #[] + else + explicitSource[0].getSepArgs.mapM fun stx => do + let some src ← isLocalIdent? stx | unreachable! + addTermInfo' stx src + let srcType ← whnf (← inferType src) + tryPostponeIfMVar srcType + let structName ← getStructureName srcType + return { stx, structName } + let implicit := + if implicitSource[0].isNone + then none + else getVariadicHoleConfig? implicitSource + return { explicit, implicit } + +/-- + We say a `{ ... }` notation is a `modifyOp` if it contains only one + ``` + def structInstArrayRef := leading_parser "[" >> termParser >>"]" + ``` +-/ +private def isModifyOp? (stx : Syntax) : TermElabM (Option Syntax) := do + let s? ← stx[2].getSepArgs.foldlM (init := none) fun s? arg => do + /- arg is of the form `structInstFieldAbbrev <|> structInstField` -/ + if arg.getKind == ``Lean.Parser.Term.structInstField then + /- Remark: the syntax for `structInstField` is + ``` + def structInstLVal := leading_parser (ident <|> numLit <|> structInstArrayRef) >> many + (group ("." >> (ident <|> numLit)) <|> structInstArrayRef) + def structInstField := leading_parser structInstLVal >> " := " >> termParser + ``` + -/ + let lval := arg[0] + let k := lval[0].getKind + if k == ``Lean.Parser.Term.structInstArrayRef then + match s? with + | none => return some arg + | some s => + if s.getKind == ``Lean.Parser.Term.structInstArrayRef then + throwErrorAt arg "invalid \{...} notation, at most one `[..]` at a given level" + else + throwErrorAt arg "invalid \{...} notation, can't mix field and `[..]` at a given level" + else + match s? with + | none => return some arg + | some s => + if s.getKind == ``Lean.Parser.Term.structInstArrayRef then + throwErrorAt arg "invalid \{...} notation, can't mix field and `[..]` at a given level" + else + return s? + else + return s? + match s? with + | none => return none + | some s => if s[0][0].getKind == ``Lean.Parser.Term.structInstArrayRef then return s? else + return none + +/-- Elaborate `modifyOp`s given a single explicit source. -/ +private def elabModifyOp (stx modifyOp : Syntax) (sources : Array ExplicitSourceInfo) +(expectedType? : Option Expr) : TermElabM Expr := do + if sources.size > 1 then + throwError "invalid \{...} notation, multiple sources and array update is not supported." + let cont (val : Syntax) : TermElabM Expr := do + let lval := modifyOp[0][0] + let idx := lval[1] + let self := sources[0]!.stx + let stxNew ← `($(self).modifyOp (idx := $idx) (fun s => $val)) + trace[Elab.struct.modifyOp] "{stx}\n===>\n{stxNew}" + withMacroExpansion stx stxNew <| elabTerm stxNew expectedType? + let rest := modifyOp[0][1] + if rest.isNone then + cont modifyOp[2] + else + let s ← `(s) + let valFirst := rest[0] + let valFirst := if valFirst.getKind == ``Lean.Parser.Term.structInstArrayRef then valFirst + else valFirst[1] + let restArgs := rest.getArgs + let valRest := mkNullNode restArgs[1:restArgs.size] + let valField := modifyOp.setArg 0 <| mkNode ``Parser.Term.structInstLVal #[valFirst, valRest] + let valSource := mkSourcesWithSyntax #[s] + let val := stx.setArg 1 valSource + let val := val.setArg 2 <| mkNullNode #[valField] + trace[Elab.struct.modifyOp] "{stx}\nval: {val}" + cont val + +/-- + Get structure name. + This method tries to postpone execution if the expected type is not available. + If the expected type is available and it is a structure, then we use it. + Otherwise, we use the type of the first source. +-/ +private def getStructName (expectedType? : Option Expr) (sourceView : Source) : TermElabM Name := do + tryPostponeIfNoneOrMVar expectedType? + let useSource : Unit → TermElabM Name := fun _ => do + unless sourceView.explicit.isEmpty do + return sourceView.explicit[0]!.structName + match expectedType? with + | some expectedType => throwUnexpectedExpectedType expectedType + | none => throwUnknownExpectedType + match expectedType? with + | none => useSource () + | some expectedType => + let expectedType ← whnf expectedType + match expectedType.getAppFn with + | Expr.const constName _ => + unless isStructure (← getEnv) constName do + throwError "invalid \{...} notation, structure type expected{indentExpr expectedType}" + return constName + | _ => useSource () +where + throwUnknownExpectedType := + throwError "invalid \{...} notation, expected type is not known" + throwUnexpectedExpectedType type (kind := "expected") := do + let type ← instantiateMVars type + if type.getAppFn.isMVar then + throwUnknownExpectedType + else + throwError "invalid \{...} notation, {kind} type is not of the form (C ...){indentExpr type}" + +/-- Information on the left hand side of a binding encountered in structure syntax. -/ +inductive FieldLHS where + /-- A representation of the name of a field as encountered in binding syntax (e.g. `x` in + `x := ...`). -/ + | fieldName (ref : Syntax) (name : Name) + /-- A representation of the index of a field as encountered in binding syntax (e.g. `3` in + `3 := ...`). -/ + | fieldIndex (ref : Syntax) (idx : Nat) + /-- A representation of a modifyOp as encountered in binding syntax. -/ + | modifyOp (ref : Syntax) (index : Syntax) + deriving Inhabited + +instance : ToFormat FieldLHS := ⟨fun lhs => + match lhs with + | .fieldName _ n => format n + | .fieldIndex _ i => format i + | .modifyOp _ i => "[" ++ i.prettyPrint ++ "]"⟩ + +/-- + A limited, pre-expression description of the values of fields. Only terms given by raw syntax, + nested values (for subobjects), and missing values are can be specified. + The polymorphism via its `Type` argument is only used for nested `FieldVal`s, which need to + know what type their argument should be. In practice, we only ever take this argument to be + `Struct`. + -/ +inductive FieldVal (σ : Type) where + /-- Term syntax encountered on the RHS of a binding, e.g. `1+1` in `x := 1+1`. -/ + | term (stx : Syntax) : FieldVal σ + /-- A nested `FieldVal`, which in practice is used to hold subobjects as `Struct`s. -/ + | nested (s : σ) : FieldVal σ + /-- An indication that this field was missing, i.e. not specified explicitly in the syntax. -/ + | missing : FieldVal σ + deriving Inhabited + +/-- + A representation of a field in a structure. This contains the original syntax of the field + (`ref`), a representation of the LHS of the `:=` binding (`lhs`), the pre-expression `FieldVal` + (`val`), and the actual expression that we take to be the value of the field (`expr?`). + `expr?` begins as `none`, and is modified over the course of this code as we figure out whether + we need to elaborate some syntax encountered (e.g. if `.term stx` is in `val`) or if the field + value is `.missing` (in which case we make a metavariable). +-/ +structure Field (σ : Type) where + /-- The syntax of the binding used to specify this field. -/ + ref : Syntax + /-- Information on the LHS of the binding used to specify this field. -/ + lhs : List FieldLHS + /-- The basic content of the field value, prior to elaboration. -/ + val : FieldVal σ + /-- The elaborated value of the field in question as it becomes available, which starts + out as `none` and is updated during `elabStruct` with either elaborated terms or + metavariables which may get assigned to synthesized defaults. -/ + expr? : Option Expr := none + deriving Inhabited + +/-- Check if the LHS of the binding specifying a field is a single `FieldLHS`. -/ +def Field.isSimple {σ} : Field σ → Bool + | { lhs := [_], .. } => true + | _ => false + +/-- + The organized content of the structure instance. + The field `params` is used for `.missing` value propagation. It is initially empty, and + then set at `elabStruct`. -/ +inductive Struct where + | mk (ref : Syntax) (structName : Name) (params : Array (Name × Expr)) + (fields : List (Field Struct)) (source : Source) + deriving Inhabited + +/-- Abbreviation for `List (Field Struct)`: A list of representations of the structure's fields. -/ +abbrev Fields := List (Field Struct) + +/-- The original syntax of the structure instance. -/ +def Struct.ref : Struct → Syntax + | ⟨ref, _, _, _, _⟩ => ref + +/-- The name of the structure. -/ +def Struct.structName : Struct → Name + | ⟨_, structName, _, _, _⟩ => structName + +/-- Parameters used during the initial processing of `.missing` fields. Initially `none`, and set + at `elabStruct`. -/ +def Struct.params : Struct → Array (Name × Expr) + | ⟨_, _, params, _, _⟩ => params + +/-- The list of `fields` in the structure instance as `Field Struct`s. Updated over the course of + the elaboration to include computed values. -/ +def Struct.fields : Struct → Fields + | ⟨_, _, _, fields, _⟩ => fields + +/-- Information on other sources of values for the structure. Namely, any structures preceding + `with` in structure update syntax and any variadic holes (`..`, `?..`) following the field + bindings. -/ +def Struct.source : Struct → Source + | ⟨_, _, _, _, s⟩ => s + +/-- `true` iff all fields of the given structure are marked as `.missing`. -/ +partial def Struct.allMissing (s : Struct) : Bool := + s.fields.all fun { val := val, .. } => match val with + | .term _ => false + | .missing => true + | .nested s => allMissing s + +/-- Pretty-prints a field (`Field Struct`). Uses the field LHS's and its `val : FieldVal Struct`. -/ +def formatField (formatStruct : Struct → Format) (field : Field Struct) : Format := + Format.joinSep field.lhs " . " ++ " := " ++ + match field.val with + | .term v => v.prettyPrint + | .nested s => formatStruct s + | .missing => "" + +/-- Pretty-prints a `Struct`. -/ +partial def formatStruct : Struct → Format + | ⟨_, _, _, fields, source⟩ => + let fieldsFmt := Format.joinSep (fields.map (formatField formatStruct)) ", " + let implicitFmt := match source.implicit with + | some v => format v.stx + | none => "" + if source.explicit.isEmpty then + "{" ++ fieldsFmt ++ implicitFmt ++ "}" + else + "{" ++ format (source.explicit.map (·.stx)) ++ " with " ++ fieldsFmt ++ implicitFmt ++ "}" + +instance : ToFormat Struct := ⟨formatStruct⟩ +instance : ToString Struct := ⟨toString ∘ format⟩ + +instance : ToFormat (Field Struct) := ⟨formatField formatStruct⟩ +instance : ToString (Field Struct) := ⟨toString ∘ format⟩ + +/-- +Turns a `FieldLHS` into syntax. The first argument specifies whether this is the first in a list of +`FieldLHS`'s or not. +Recall that `structInstField` elements have the form +``` + def structInstField := leading_parser structInstLVal >> " := " >> termParser + def structInstLVal := leading_parser (ident <|> numLit <|> structInstArrayRef) + >> many (("." >> (ident <|> numLit)) <|> structInstArrayRef) + def structInstArrayRef := leading_parser "[" >> termParser >>"]" +``` +Remark: this code relies on the fact that `expandStruct` only transforms `fieldLHS.fieldName` +-/ +def FieldLHS.toSyntax (first : Bool) : FieldLHS → Syntax + | .modifyOp stx _ => stx + | .fieldName stx name => if first then mkIdentFrom stx name + else mkGroupNode #[mkAtomFrom stx ".", mkIdentFrom stx name] + | .fieldIndex stx _ => if first then stx else mkGroupNode #[mkAtomFrom stx ".", stx] + +/-- Extracts the `stx` from a `.term stx : FieldVal Struct`. Panics when called on any other + constructor of `FieldVal Struct`. -/ +def FieldVal.toSyntax : FieldVal Struct → Syntax + | .term stx => stx + | _ => unreachable! + +/-- Turns a field (as a `Field Struct`) into syntax if has a `val` of the form `.term stx`; panics + otherwise. Panics if the `lhs` is an empty list. -/ +def Field.toSyntax : Field Struct → Syntax + | field => + let stx := field.ref + let stx := stx.setArg 2 field.val.toSyntax + match field.lhs with + | first::rest => stx.setArg 0 <| mkNullNode + #[first.toSyntax true, mkNullNode <| rest.toArray.map (FieldLHS.toSyntax false) ] + | _ => unreachable! + +/-- Processes syntax into a `FieldLHS`. -/ +private def toFieldLHS (stx : Syntax) : MacroM FieldLHS := + if stx.getKind == ``Lean.Parser.Term.structInstArrayRef then + return FieldLHS.modifyOp stx stx[1] + else + -- Note that the representation of the first field is different. + let stx := if stx.getKind == groupKind then stx[1] else stx + if stx.isIdent then + return FieldLHS.fieldName stx stx.getId.eraseMacroScopes + else match stx.isFieldIdx? with + | some idx => return FieldLHS.fieldIndex stx idx + | none => Macro.throwError "unexpected structure syntax" + +/-- Processes structure instance syntax into a `Struct` given the `structName` and its `source`s. -/ +private def mkStructView (stx : Syntax) (structName : Name) (source : Source) : MacroM Struct := do + /- Recall that `stx` is of the form + ``` + leading_parser "{" >> optional (atomic (sepBy1 termParser ", " >> " with ")) + >> sepByIndent (structInstFieldAbbrev <|> structInstField) ... + >> variadicHole + >> optional (" : " >> termParser) + >> " }" + ``` + This method assumes that `structInstFieldAbbrev` had already been expanded. + -/ + let fields ← stx[2].getSepArgs.toList.mapM fun fieldStx => do + let val := fieldStx[2] + let first ← toFieldLHS fieldStx[0][0] + let rest ← fieldStx[0][1].getArgs.toList.mapM toFieldLHS + return { ref := fieldStx, lhs := first :: rest, val := FieldVal.term val : Field Struct } + return ⟨stx, structName, #[], fields, source⟩ + +/-- (Monadic) Modifies a `Struct`'s fields with a monadic function. -/ +def Struct.modifyFieldsM {m : Type → Type} [Monad m] (s : Struct) (f : Fields → m Fields) : +m Struct := + match s with + | ⟨ref, structName, params, fields, source⟩ => + return ⟨ref, structName, params, (← f fields), source⟩ + +/-- Modify a `Struct`'s `Fields` with a function. -/ +def Struct.modifyFields (s : Struct) (f : Fields → Fields) : Struct := + Id.run <| s.modifyFieldsM f + +/-- Overwrite a `Struct`'s fields. -/ +def Struct.setFields (s : Struct) (fields : Fields) : Struct := + s.modifyFields fun _ => fields + +/-- Overwrite a `Struct`'s params. -/ +def Struct.setParams (s : Struct) (ps : Array (Name × Expr)) : Struct := + match s with + | ⟨ref, structName, _, fields, source⟩ => ⟨ref, structName, ps, fields, source⟩ + +/-- Breaks down non-anonymous names in the lhs of fields into lists of their components. -/ +private def expandCompositeFields (s : Struct) : Struct := + s.modifyFields fun fields => fields.map fun field => match field with + | { lhs := .fieldName _ (.str Name.anonymous ..) :: _, .. } => field + | { lhs := .fieldName ref n@(.str ..) :: rest, .. } => + let newEntries := n.components.map <| FieldLHS.fieldName ref + { field with lhs := newEntries ++ rest } + | _ => field + +/-- Replaces field lhs's that are specified by index with the name of the field (as registered in + the structure). -/ +private def expandNumLitFields (s : Struct) : TermElabM Struct := + s.modifyFieldsM fun fields => do + let env ← getEnv + let fieldNames := getStructureFields env s.structName + fields.mapM fun field => match field with + | { lhs := .fieldIndex ref idx :: rest, .. } => + if idx == 0 then throwErrorAt ref "invalid field index, index must be greater than 0" + else if idx > fieldNames.size + then throwErrorAt ref "invalid field index, structure has only #{fieldNames.size} fields" + else return { field with lhs := .fieldName ref fieldNames[idx - 1]! :: rest } + | _ => return field + +/-- For example, consider the following structures: + ``` + structure A where + x : Nat + structure B extends A where + y : Nat + structure C extends B where + z : Bool + ``` + This method expands parent structure fields using the path to the parent structure. + For example, + ``` + { x := 0, y := 0, z := true : C } + ``` + is expanded into + ``` + { toB.toA.x := 0, toB.y := 0, z := true : C } + ``` +-/ +private def expandParentFields (s : Struct) : TermElabM Struct := do + let env ← getEnv + s.modifyFieldsM fun fields => fields.mapM fun field => do match field with + | { lhs := .fieldName ref fieldName :: _, .. } => + addCompletionInfo <| CompletionInfo.fieldId ref fieldName (← getLCtx) s.structName + match findField? env s.structName fieldName with + | none => throwErrorAt ref "'{fieldName}' is not a field of structure '{s.structName}'" + | some baseStructName => + if baseStructName == s.structName then pure field + else match getPathToBaseStructure? env baseStructName s.structName with + | some path => + let path := path.map fun funName => match funName with + | .str _ s => .fieldName ref (Name.mkSimple s) + | _ => unreachable! + return { field with lhs := path ++ field.lhs } + | _ => throwErrorAt ref "failed to access field '{fieldName}' in parent structure" + | _ => return field + +/-- Abbreviation for `HashMap Name Fields`: A hash map from field names to lists of representations + of fields. -/ +private abbrev FieldMap := HashMap Name Fields + +/-- Creates a hash map from field names to lists of representations of fields. The length of the + list can be greater than one if the field is not simple. Panics if the lhs of a field is empty. + -/ +private def mkFieldMap (fields : Fields) : TermElabM FieldMap := + fields.foldlM (init := {}) fun fieldMap field => + match field.lhs with + | .fieldName _ fieldName :: _ => + match fieldMap.find? fieldName with + | some (prevField::restFields) => + if field.isSimple || prevField.isSimple then + throwErrorAt field.ref "field '{fieldName}' has already been specified" + else + return fieldMap.insert fieldName (field::prevField::restFields) + | _ => return fieldMap.insert fieldName [field] + | _ => unreachable! + +/-- Unwraps a `Field Struct` from a list of length one, and otherwise returns `none`. -/ +private def isSimpleField? : Fields → Option (Field Struct) + | [field] => if field.isSimple then some field else none + | _ => none + +/-- Finds the index of the field name in its third argument in the list of field names in its + second. The first argument, the name of the structure, is used only for descriptive error + messages. -/ +private def getFieldIdx (structName : Name) (fieldNames : Array Name) (fieldName : Name) : +TermElabM Nat := do + match fieldNames.findIdx? fun n => n == fieldName with + | some idx => return idx + | none => throwError "field '{fieldName}' is not a valid field of '{structName}'" + +/-- Constructs the syntax for a field projection. Only does so if the given field name is in fact a + field of the given structure name; returns `none` otherwise. -/ +def mkProjStx? (s : Syntax) (structName : Name) (fieldName : Name) : TermElabM (Option Syntax) := do + if (findField? (← getEnv) structName fieldName).isNone then + return none + return some <| mkNode ``Parser.Term.proj #[s, mkAtomFrom s ".", mkIdentFrom s fieldName] + +/-- Gets a field from a list of fields by name. If not found, returns `none`. -/ +def findField? (fields : Fields) (fieldName : Name) : Option (Field Struct) := + fields.find? fun field => + match field.lhs with + | [.fieldName _ n] => n == fieldName + | _ => false + +mutual + + /-- Group fields that belong to a subobject as a `Struct` under that subobject field via a + `.nested s` `FieldVal`. For example, a `Struct` representing + `{ toFoo.x := 1, toFoo.y := 2, z := 3 }` will become one representing + `{ toFoo := { x := 1, y := 2 }, z := 3 }`. + -/ + private partial def groupFields (s : Struct) : TermElabM Struct := do + let env ← getEnv + withRef s.ref do + s.modifyFieldsM fun fields => do + let fieldMap ← mkFieldMap fields + fieldMap.toList.mapM fun ⟨fieldName, fields⟩ => do + match isSimpleField? fields with + | some field => pure field + | none => + let substructFields := fields.map fun field => { field with lhs := field.lhs.tail! } + let field := fields.head! + match Lean.isSubobjectField? env s.structName fieldName with + | some substructName => + let substruct := Struct.mk s.ref substructName #[] substructFields s.source + let substruct ← expandStruct substruct + pure { field with lhs := [field.lhs.head!], val := FieldVal.nested substruct } + | none => + let updateSource (structStx : Syntax) : TermElabM Syntax := do + let sourcesNew ← s.source.explicit.filterMapM + fun source => mkProjStx? source.stx source.structName fieldName + let explicitSourceStx := if sourcesNew.isEmpty then mkNullNode + else mkSourcesWithSyntax sourcesNew + let implicitSourceStx := s.source.implicit.map (·.stx) |>.getD mkNullNode + return (structStx.setArg 1 explicitSourceStx).setArg 3 implicitSourceStx + let valStx := s.ref -- construct substructure syntax using s.ref as template + let valStx := valStx.setArg 4 mkNullNode -- erase optional expected type + let args := substructFields.toArray.map (·.toSyntax) + let valStx := valStx.setArg 2 (mkNullNode <| mkSepArray args (mkAtom ",")) + let valStx ← updateSource valStx + return { field with lhs := [field.lhs.head!], val := FieldVal.term valStx } + + /-- + Add `val : FieldVal`s to fields as specified by the sources. + If a value is found in the explicit sources (prior to `with`), add it as a `.term` or a + `.nested` `FieldVal`, as appropriate. If not, check for `..`, and make a hole via syntax as a + `.term`. Otherwise, mark the field as as `.missing`. + -/ + private partial def addMissingFields (s : Struct) : TermElabM Struct := do + let env ← getEnv + let fieldNames := getStructureFields env s.structName + let ref := s.ref.mkSynthetic + withRef ref do + let fields ← fieldNames.foldlM (init := []) fun fields fieldName => do + match findField? s.fields fieldName with + | some field => return field::fields + | none => + let addField (val : FieldVal Struct) : TermElabM Fields := do + return { ref, lhs := [FieldLHS.fieldName ref fieldName], val := val } :: fields + match Lean.isSubobjectField? env s.structName fieldName with + | some substructName => + -- If one of the sources has the subobject field, use it + if let some val ← s.source.explicit.findSomeM? + fun source => mkProjStx? source.stx source.structName fieldName + then + addField (FieldVal.term val) + else + let substruct := Struct.mk ref substructName #[] [] s.source + let substruct ← expandStruct substruct + addField (FieldVal.nested substruct) + | none => + if let some val ← s.source.explicit.findSomeM? + fun source => mkProjStx? source.stx source.structName fieldName + then + addField (FieldVal.term val) + else + -- Use hole syntax as a term in the natural, no-defaults (`..`) case; + -- otherwise mark it as a missing field. + match s.source.implicit with + | some { isSynthetic := false, useDefaults := false, .. } => + addField (FieldVal.term (mkHole ref)) + | _ => addField FieldVal.missing + return s.setFields fields.reverse + + /-- Put the `Struct` into canonical form by expanding different ways of specifying fields + (composite, by index, subobject); group fields by subobject; and incorporate values (or + holes) sources. -/ + private partial def expandStruct (s : Struct) : TermElabM Struct := do + let s := expandCompositeFields s + let s ← expandNumLitFields s + let s ← expandParentFields s + let s ← groupFields s + addMissingFields s + +end + +/-- Information about the constructor. -/ +structure CtorHeaderResult where + /-- The constructor function itself as an `Expr`. -/ + ctorFn : Expr + /-- The type of the constructor as an `Expr`. -/ + ctorFnType : Expr + /-- Metavariables for instances. -/ + instMVars : Array MVarId + /-- Named parameters encountered in bindings of the type and the expressions used for them. -/ + params : Array (Name × Expr) + +/-- Helper function that processes the constructor and its type until its first parameter reaches 0. +-/ +private def mkCtorHeaderAux : +Nat → Expr → Expr → Array MVarId → Array (Name × Expr) → TermElabM CtorHeaderResult + | 0, type, ctorFn, instMVars, params => + return { ctorFn , ctorFnType := type, instMVars, params } + | n+1, type, ctorFn, instMVars, params => do + match (← whnfForall type) with + | .forallE paramName d b c => + match c with + | .instImplicit => + let a ← mkFreshExprMVar d .synthetic + mkCtorHeaderAux n (b.instantiate1 a) (mkApp ctorFn a) (instMVars.push a.mvarId!) + (params.push (paramName, a)) + | _ => + let a ← mkFreshExprMVar d + mkCtorHeaderAux n (b.instantiate1 a) (mkApp ctorFn a) instMVars (params.push (paramName, a)) + | _ => throwError "unexpected constructor type" + +/-- Burrows into the body of a `.forallE` expression `n` times if possible, and returns the result. + If an expression not of the form `.forallE` is encountered along the way, return `none`. -/ +private partial def getForallBody : Nat → Expr → Option Expr + | i+1, .forallE _ _ b _ => getForallBody i b + | _+1, _ => none + | 0, type => type + +/-- When the expected type is known, attempt to get the type of the constructor by stripping `n` + `.forallE`'s off of the expression and then assigning metavariables by `isDefEq`'ing with + the expected type. -/ +private def propagateExpectedType (type : Expr) (numFields : Nat) (expectedType? : Option Expr) : +TermElabM Unit := do + match expectedType? with + | none => return () + | some expectedType => + match getForallBody numFields type with + | none => pure () + | some typeBody => + unless typeBody.hasLooseBVars do + discard <| isDefEq expectedType typeBody + +/-- Process information about a given `ConstructorVal`. -/ +private def mkCtorHeader (ctorVal : ConstructorVal) (expectedType? : Option Expr) : +TermElabM CtorHeaderResult := do + let us ← mkFreshLevelMVars ctorVal.levelParams.length + let val := Lean.mkConst ctorVal.name us + let type ← instantiateTypeLevelParams (ConstantInfo.ctorInfo ctorVal) us + let r ← mkCtorHeaderAux ctorVal.numParams type val #[] #[] + propagateExpectedType r.ctorFnType ctorVal.numFields expectedType? + synthesizeAppInstMVars r.instMVars r.ctorFn + return r + +/-- Annotate an expression to indicate that it must be synthesized as a default value. + In practice, the expression is a metavariable. -/ +def markDefaultMissing (e : Expr) : Expr := + mkAnnotation `structInstDefault e + +/-- Check if an expression has been annotated in a way that indicates it should be synthesized + during the default loop. -/ +def defaultMissing? (e : Expr) : Option Expr := + annotation? `structInstDefault e + +/-- Provide a descriptive error message if the structure instance elaboration fails. -/ +def throwFailedToElabField {α} (fieldName : Name) (structName : Name) (msgData : MessageData) : +TermElabM α := + throwError "failed to elaborate field '{fieldName}' of '{structName}, {msgData}" + +/-- Attempt to synthesize an -/ +def trySynthStructInstance? (s : Struct) (expectedType : Expr) : TermElabM (Option Expr) := do + if !s.allMissing then + return none + else + try synthInstance? expectedType catch _ => return none + +-- By Mario Carneiro +/-- Use an expression in syntax. Example: ``(foo $(← toSyntax e))`. + This works by creating syntax for a metavariable, then elaborating that syntax and assigning + the metavariable to the expression in question. + -/ +def toSyntax (e : Expr) (type? : Option Expr := none) : TermElabM Syntax := withFreshMacroScope do + let stx ← `(?a) + let mvar ← elabTerm stx type? + mvar.mvarId!.assign e + pure stx + +/-- + The result of running `elabStruct` on a `Struct`, containing: + * `struct : Struct`, now with updated `expr?` values in its fields, representing the values for + those fields. + * `val : Expr`, the constructor applied to the field values (`expr?`s). This is the actual + expression that the structure instance elaborates to. (Note that this is distinct from the + `val` of each field, which is a `FieldVal`.) + * `instMVars : Array MVarId`, used forkeeping track of instances. + -/ +structure ElabStructResult where + /-- The structure's constructor applied to the field values (`expr?`s). This is the actual + expression that the structure instance elaborates to. -/ + val : Expr + /-- The `struct` that was fed to `elabStruct`, but now with updated `expr?` values for all of its + fields containing their values as expressions. -/ + struct : Struct + /-- Used for keeping track of instances. -/ + instMVars : Array MVarId + +/-- + Elaborates a `Struct` into an `ElabStructResult`. + This computes expressions for all fields of a structure (in `expr?`) on the basis of `FieldVal`s + while simultaneously building the elaboration of the structure instance itself, in the form of + its constructor applied to the expressions for each of its fields in turn. + `.term stx` `FieldVals` are elaborated while ensuring the type (as given by the constructor's + type), `.nested s` `FieldVals` are recursed into. `.missing` `FieldVals` are replaced with + metavariables and annotated to indicate that they will get assigned during the default synthesis + loop. Note that in this case the same metavariable is used both in the `expr?` field and the + final constructed expression (`val`), so that assigning it gives access to the value in both + places. The one exception is if an `autoParam` is encountered in the type, in which case the + tactic is elaborated. +-/ +private partial def elabStruct (s : Struct) (expectedType? : Option Expr) : +TermElabM ElabStructResult := withRef s.ref do + let env ← getEnv + let vhc? := s.source.implicit + let ctorVal := getStructureCtor env s.structName + if isPrivateNameFromImportedModule env ctorVal.name then + throwError "invalid \{...} notation, constructor for `{s.structName}` is marked as private" + -- We store the parameters at the resulting `Struct`. + -- We use this information during default value propagation. + let { ctorFn, ctorFnType, params, .. } ← mkCtorHeader ctorVal expectedType? + let (e, _, fields, instMVars) ← s.fields.foldlM + (init := (ctorFn, ctorFnType, [], #[])) + fun (e, type, fields, instMVars) field => do + match field.lhs with + | [.fieldName ref fieldName] => + let type ← whnfForall type + trace[Elab.struct] "elabStruct {field}, {type}" + match type with + | .forallE _ d b bi => + let cont (val : Expr) (field : Field Struct) (instMVars := instMVars) + (updateField := true) : TermElabM (Expr × Expr × Fields × Array MVarId) := do + pushInfoTree <| InfoTree.node (children := {}) <| Info.ofFieldInfo { + projName := s.structName.append fieldName, + fieldName, + lctx := (← getLCtx), + val, + stx := ref } + let e := mkApp e val + let type := b.instantiate1 val + let field := if updateField then { field with expr? := some val } else field + return (e, type, field::fields, instMVars) + match field.val with + | .term stx => + cont (← elabTermEnsuringType stx d.consumeTypeAnnotations) field + | .nested s => + let inst? := if vhc?.all (·.useDefaults) then + (← trySynthStructInstance? s d) else none + match inst? with + | some val => + cont val { field with val := FieldVal.term (mkHole field.ref) } + | none => + let { val, struct := sNew, instMVars := instMVarsNew } ← elabStruct s (some d) + let val ← ensureHasType d val + cont val { field with val := FieldVal.nested sNew } (instMVars ++ instMVarsNew) + | .missing => + match d.getAutoParamTactic? with + | some (.const tacticDecl ..) => + let d := (d.getArg! 0).consumeTypeAnnotations + if vhc?.all (·.useDefaults) then + match evalSyntaxConstant env (← getOptions) tacticDecl with + | .error err => throwError err + | .ok tacticSyntax => + if vhc?.isSome then + let val := (← mkFreshExprMVar (some d) .synthetic) + let stx ← `(by first | $tacticSyntax | exact $(← toSyntax val)) + cont (← elabTermEnsuringType stx d) + {field with expr? := some (markDefaultMissing val)} + (updateField := false) + else + let stx ← `(by $tacticSyntax) + cont (← elabTermEnsuringType stx d) field + else + let val ← withRef field.ref <| mkFreshExprMVar (some d) + cont (markDefaultMissing val) field + | _ => + if bi == .instImplicit then + let val ← withRef field.ref <| mkFreshExprMVar d .synthetic + trace[Elab.struct] ".instImplicit ({val})" + cont val field (instMVars.push val.mvarId!) + else + let val ← withRef field.ref <| mkFreshExprMVar (some d) + cont (markDefaultMissing val) field + | _ => withRef field.ref (throwFailedToElabField + fieldName s.structName m!"unexpected constructor type{indentExpr type}") + | _ => throwErrorAt field.ref "unexpected unexpanded structure field" + return { val := e, struct := s.setFields fields.reverse |>.setParams params, instMVars } + +namespace ImplicitFields + +/-- Updated as we search for default values. We must search for default values overriden in derived + structures. -/ +structure Context where + /-- `Struct`s in the context which might supply default values. -/ + structs : Array Struct := #[] + /-- The names of structures in the context which might supply default values. -/ + allStructNames : Array Name := #[] + /-- + Consider the following example: + ``` + structure A where + x : Nat := 1 + structure B extends A where + y : Nat := x + 1 + x := y + 1 + structure C extends B where + z : Nat := 2*y + x := z + 3 + ``` + And we are trying to elaborate a structure instance for `C`. + There are default values for `x` at `A`, `B`, and `C`. + We say the default value at `C` has distance 0, the one at `B` distance 1, and the one at `A` + distance 2. + The field `maxDistance` specifies the maximum distance considered in a round of Default field + computation. + Remark: since `C` does not set a default value of `y`, the default value at `B` is at distance 0. + The fixpoint for setting default values works in the following way. + - Keep computing default values using `maxDistance == 0`. + - We increase `maxDistance` whenever we failed to compute a new default value in a round. + - If `maxDistance > 0`, then we interrupt a round as soon as we compute some default value. + We use depth-first search. + - We sign an error if no progress is made when `maxDistance` == structure hierarchy depth (2 in + the example above). + -/ + maxDistance : Nat := 0 + +/-- Stores an indicator of whether progress has been made during a round in the default loop. -/ +structure State where + /-- Indicates whether progress has been made during a round in the default loop. -/ + progress : Bool := false + +/-- Collects the names of all nested structures in a `Struct` (at any depth), including the name of + the structure itself. -/ +partial def collectStructNames (struct : Struct) (names : Array Name) : Array Name := + let names := names.push struct.structName + struct.fields.foldl (init := names) fun names field => + match field.val with + | .nested struct => collectStructNames struct names + | _ => names + +/-- Gets the maximum depth at which any structure is nested within the given structure, i.e. the + height of its subobject poset. -/ +partial def getHierarchyDepth (struct : Struct) : Nat := + struct.fields.foldl (init := 0) fun max field => + match field.val with + | .nested struct => Nat.max max (getHierarchyDepth struct + 1) + | _ => max + +/-- (Monadic) Checks if the value of a field (`expr?`) is an unassigned metavariable that is + annotated to indicate that it should be synthesized during the default loop. -/ +def isDefaultMissing? [Monad m] [MonadMCtx m] (field : Field Struct) : m Bool := do + if let some expr := field.expr? then + if let some (.mvar mvarId) := defaultMissing? expr then + unless (← mvarId.isAssigned) do + return true + return false + +/-- (Monadic) Gets the first encountered field in a `Struct` whose value (`expr?`) is an unassigned + metavariable that is annotated to indicate that it should be synthesized during the default + loop. -/ +partial def findDefaultMissing? [Monad m] [MonadMCtx m] (struct : Struct) : +m (Option (Field Struct)) := + struct.fields.findSomeM? fun field => do + match field.val with + | .nested struct => findDefaultMissing? struct + | _ => return if (← isDefaultMissing? field) then field else none + +/-- (Monadic) Gets an array containing all fields in the `Struct` whose value (`expr?`) is an + unassigned metavariable that is annotated to indicate that it should be synthesized during the + default loop. -/ +partial def allDefaultMissing [Monad m] [MonadMCtx m] (struct : Struct) : +m (Array (Field Struct)) := + go struct *> get |>.run' #[] +where + /-- Loop through all fields in the `Struct`, recursing if a `.nested` one is found, and storing + the field in a mutable array if it `isDefaultMissing?` -/ + go (struct : Struct) : StateT (Array (Field Struct)) m Unit := + for field in struct.fields do + if let .nested struct := field.val then + go struct + else if (← isDefaultMissing? field) then + modify (·.push field) + +/-- Gets the name of a field, assuming that its `lhs` is of the form `[.fieldName _ fieldName]`. + Panics otherwise. -/ +def getFieldName (field : Field Struct) : Name := + match field.lhs with + | [.fieldName _ fieldName] => fieldName + | _ => unreachable! + +/-- Abbreviation for `ReaderT Context (StateRefT State TermElabM)`: A monad transformation of + `TermElabM` that lets us access the `Context` (relevant for checking if default values are + overridden) and keeping track of whether progress has been made during a round of the default + loop (`State`). -/ +abbrev M := ReaderT Context (StateRefT State TermElabM) + +/-- Checks if the round has completed by checking that progress has been made and that the + `maxDistance > 0`. -/ +def isRoundDone : M Bool := do + return (← get).progress && (← read).maxDistance > 0 + +/-- Gets the value (`expr?`) of a field in a `Struct` given the name of the field. -/ +def getFieldValue? (struct : Struct) (fieldName : Name) : Option Expr := + struct.fields.findSome? fun field => + if getFieldName field == fieldName then + field.expr? + else + none + +section NamedGoalsWithMetadata +/-- A convenient representation of the metadata attached to named goals produced by `?..` syntax. -/ +structure FieldHoleMData where + /-- The index of the named goal used for name conflict resolution when dealing with multiple + occcurrences of `?..`. Each conflicting use of `?..` should generate field holes with + different indices. An index of `0` indicates that no name conflicts were found with any + existing goals. -/ + index : Nat + /-- The syntax of the structure instance that contained the `?..` syntax. -/ + structRef : Syntax + /-- The name of the structure that contained the `?..` syntax. -/ + structName : Name + /-- The name of the field this goal represents. -/ + fieldName : Name + /-- The name to be prefixed to the name of this goal. `Name.anonymous` indicates that no name is + to be prefixed. -/ + prefixName : Name + +/-- Creates the metadata for a field's named goal given the field, the `Struct`, and the + conflict-resolution index. -/ +def mkFieldHoleMData (index : Nat) (field : Field Struct) (struct : Struct) : FieldHoleMData := + { + index, + structRef := struct.ref + structName := struct.structName + fieldName := getFieldName field + prefixName := match struct.source.implicit with + | some {name := some prefixName, ..} => prefixName + | _ => Name.anonymous + } + +open KVMap in +/-- Gets the field hole metadata from a metavariable if present. -/ +def getFieldHoleMDataFromMVar? (decl : MetavarDecl) : Option FieldHoleMData := + match decl.type with + | .mdata md _ => + if getBool md `fieldHole then + some + { + index := getNat md `index + structRef := getSyntax md `structRef + structName := getName md `structName + fieldName := getName md `fieldName + prefixName := getName md `prefixName + } + else none + | _ => none + +/-- Checks if a metavariable decl is a named field hole created by `?..` syntax. -/ +def isFieldHole (decl : MetavarDecl) : Bool := + match decl.type with + | .mdata md _ => KVMap.getBool md `fieldHole + | _ => false + +section KVMap +/-- Merges two `KVMap`s, overwriting the values of any shared keys with those in the second `KVMap` + -/ +def mergeKVMap : KVMap → KVMap → KVMap := + fun m₀ m₁ => Id.run do + let mut m := m₀ + for (name, data) in m₁ do + m := KVMap.insert m name data + return m + +/-- Turns a list of key-value pairs (e.g. ``[(`a, ofBool true), (`b, ofNat 2), ...]``) into a + `KVMap`. -/ +def toKVMap : List (Name × DataValue) → KVMap +| l => l.foldl (fun m (n, d) => KVMap.insert m n d) {} + +end KVMap + +open DataValue in +/-- Turns a representation of field hole metadata into actual metadata (a `KVMap`). -/ +def mkFieldHoleMDataKVMap (f : FieldHoleMData) : KVMap := + toKVMap [ + (`fieldHole , ofBool true ), + (`index , ofNat f.index ), + (`structRef , ofSyntax f.structRef ), + (`structName , ofName f.structName), + (`fieldName , ofName f.fieldName ), + (`prefixName , ofName f.prefixName) + ] + +/-- + Create a metavariable with `metadata` attached to its `type`. + If there's any existing metadata on `type`, `metadata` is preferentially merged into it. + -/ +def mkFreshExprMVarWithMData (type : Expr) (metadata : KVMap) (kind : MetavarKind := default) +(userName := Name.anonymous) : MetaM Expr := + let annotatedType := + match type with + | .mdata m e => + let merge := mergeKVMap m metadata + Expr.mdata merge e + | _ => + Expr.mdata metadata type + mkFreshExprMVar annotatedType (kind := kind) (userName := userName) + +/-- Make a fresh expression metavariable for a field, named accordingly, and with metadata + attached. -/ +def mkFreshFieldNamedMVar (type : Expr) (index : Nat) (prefixName : Option Name) +(field : Field Struct) (struct : Struct) : MetaM Expr := + let fieldHoleMData := mkFieldHoleMDataKVMap <| mkFieldHoleMData index field struct + let name := + match prefixName with + | some x => x ++ (getFieldName field) + | none => getFieldName field + let name := if index == 0 then name else name.appendIndexAfter index + mkFreshExprMVarWithMData type fieldHoleMData (kind := .syntheticOpaque) (userName := name) + +/-- Given the names of two structures, check if they have any field names in common. -/ +def fieldsOverlap (env : Environment) (structName₀ : Name) (structName₁ : Name) : Bool := + let fields₀ := getStructureFieldsFlattened env structName₀ false + let fields₁ := getStructureFieldsFlattened env structName₁ false + fields₀.any (fun field => fields₁.contains field) + +-- Monadic to enable tracing. +/-- If the provided metavariable decl is a named field hole created by `?..` syntax, check if it + conflicts with the current structure and prefix name. If so, return its index. Otherwise, + return `none`. -/ +def getConflictingIndex? (env : Environment) (s : Struct) (prefixName : Name) (decl : MetavarDecl) +: TermElabM (Option Nat) := do + let fieldHoleMData? := getFieldHoleMDataFromMVar? decl + match fieldHoleMData? with + | some fieldHoleMData => + let cond2 := prefixName == fieldHoleMData.prefixName + let cond3 := fieldsOverlap env s.structName (fieldHoleMData.structName) + trace[Elab.struct] + "goal name conflict for {fieldHoleMData.structName}: {cond2} && {cond3}" + if cond2 && cond3 + then return some fieldHoleMData.index + else return none + | none => return none + +/-- Get the next non-conflicting index among all metavariable conflicts. + A metavariable conflicts iff all of the following are true: + * it is a named field hole created by `?..` syntax + * it is not from the same occurrence of `?..` + * it has the same prefix name (possibly `Name.anonymous` if it does not have a prefix) + * it belongs to a structure that has field names in common with the current structure + Note that this gets the index one greater than the maximum conflicting index, not the next + "available" index. We take a "wide berth" approach to avoid situations where it might appear + like two goals are from the same occurrence of `?..` despite this not being the case. -/ +def nextIndexGivenCollisions (env : Environment) (mctx : MetavarContext) (s : Struct) +: TermElabM Nat := do + let prefixName := match s.source.implicit with + | some { name := some prefixName, .. } => prefixName + | _ => Name.anonymous + let conflictingIndex : (Option Nat) ← mctx.decls.foldl + (fun i? _ decl => do + let i'? ← getConflictingIndex? env s prefixName decl + return (Option.merge max (← i?) i'?)) (pure none) + match conflictingIndex with + | some i => return i+1 + | none => return 0 + +/-- Assign all fields which did not get synthesized during the default loop (but which were marked + as such) to appropriately-named field holes with metadata in the case of `?..` syntax (and to + natural holes when the `?` is absent). -/ +def assignRemainingDefaultsToFieldHoles (struct : Struct) : TermElabM Unit := + withRef struct.ref do + match struct.source.implicit with + | some vhc => + let index ← nextIndexGivenCollisions (← getEnv) (← getMCtx) struct + for field in (← allDefaultMissing struct) do + match field.expr? with + | some expr => + match defaultMissing? expr with + | some (.mvar mvarId) => + let type := (← getMVarDecl mvarId).type + if vhc.isSynthetic then + mvarId.assign (← withRef field.ref <| + mkFreshFieldNamedMVar type index vhc.name field struct) + else + let newHole ← withRef field.ref <| mkFreshExprMVar type (kind := .natural) + mvarId.assign newHole + registerMVarErrorHoleInfo newHole.mvarId! struct.ref + | _ => unreachable! + | none => unreachable! + | none => return () + +end NamedGoalsWithMetadata +/-- A helper function that applies lambdas whose parameters are field names to the corresponding + field values until it finds a non-lambda, using propagated parameters instead of field names if + necessary along the way. Returns `none` if it finds a lambda that's not of this form. -/ +partial def mkDefaultValueAux? (struct : Struct) : Expr → TermElabM (Option Expr) + | .lam n d b c => withRef struct.ref do + if c.isExplicit then + let fieldName := n + match getFieldValue? struct fieldName with + | none => return none + | some val => + let valType ← inferType val + if (← isDefEq valType d) then + mkDefaultValueAux? struct (b.instantiate1 val) + else + return none + else + if let some (_, param) := struct.params.find? fun (paramName, _) => paramName == n then + -- Recall that we did not use to have support for parameter propagation here. + if (← isDefEq (← inferType param) d) then + mkDefaultValueAux? struct (b.instantiate1 param) + else + return none + else + let arg ← mkFreshExprMVar d + mkDefaultValueAux? struct (b.instantiate1 arg) + | e => + if e.isAppOfArity ``id 2 then + return some e.appArg! + else + return some e + +/-- If possible, make a default value by applying lambdas in the given constant to the appropriate + field values or propagated parameter values. -/ +def mkDefaultValue? (struct : Struct) (cinfo : ConstantInfo) : TermElabM (Option Expr) := + withRef struct.ref do + let us ← mkFreshLevelMVarsFor cinfo + mkDefaultValueAux? struct (← instantiateValueLevelParams cinfo us) + +/-- Reduce default value. It performs beta reduction and projections of the given structures. -/ +partial def reduce (structNames : Array Name) (e : Expr) : MetaM Expr := do + match e with + | .lam .. => lambdaLetTelescope e fun xs b => do mkLambdaFVars xs (← reduce structNames b) + | .forallE .. => forallTelescope e fun xs b => do mkForallFVars xs (← reduce structNames b) + | .letE .. => lambdaLetTelescope e fun xs b => do mkLetFVars xs (← reduce structNames b) + | .proj _ i b => + match (← Meta.project? b i) with + | some r => reduce structNames r + | none => return e.updateProj! (← reduce structNames b) + | .app f .. => + match (← reduceProjOf? e structNames.contains) with + | some r => reduce structNames r + | none => + let f := f.getAppFn + let f' ← reduce structNames f + if f'.isLambda then + let revArgs := e.getAppRevArgs + reduce structNames (f'.betaRev revArgs) + else + let args ← e.getAppArgs.mapM (reduce structNames) + return mkAppN f' args + | .mdata _ b => + let b ← reduce structNames b + if (defaultMissing? e).isSome && !b.isMVar then + return b + else + return e.updateMData! b + | .mvar mvarId => + match (← getExprMVarAssignment? mvarId) with + | some val => if val.isMVar then pure val else reduce structNames val + | none => return e + | e => return e + +/-- + Attempt to synthesize the default value for a field, looping through nested structures if + necessary. If a default value is found, assign it to the metavariable that we created for the + field's value back in `elabStruct`, and return `true`. Otherwise return `false`. +-/ +partial def tryToSynthesizeDefault (structs : Array Struct) (allStructNames : Array Name) +(maxDistance : Nat) (fieldName : Name) (mvarId : MVarId) : TermElabM Bool := + let rec loop (i : Nat) (dist : Nat) := do + if dist > maxDistance then + return false + else if h : i < structs.size then + let struct := structs.get ⟨i, h⟩ + match getDefaultFnForField? (← getEnv) struct.structName fieldName with + | some defFn => + let cinfo ← getConstInfo defFn + let mctx ← getMCtx + match (← mkDefaultValue? struct cinfo) with + | none => setMCtx mctx; loop (i+1) (dist+1) + | some val => + let val ← reduce allStructNames val + match val.find? fun e => (defaultMissing? e).isSome with + | some _ => setMCtx mctx; loop (i+1) (dist+1) + | none => + let mvarDecl ← getMVarDecl mvarId + let val ← ensureHasType mvarDecl.type val + mvarId.assign val + return true + | _ => loop (i+1) dist + else + return false + loop 0 0 + +/-- The main loop of `tryToSynthesizeDefault`, which keeps track of which struct out of an array of + all nested structs is being considered, as well as the distance to make sure it doesn't exceed + the `maxDistance` (see the documentation for `Context.maxDistance`). -/ +add_decl_doc tryToSynthesizeDefault.loop + +/-- + A step within the default synthesis loop. We proceed only if the round is not done. We loop + through all fields in the structure, attempting to synthesize a default via + `tryToSynthesizeDefault` when possible. If we succeed, we set `progress := true` in the `State`. + Note: by now, all `expr?`s should be `some expr` from `elabStruct`, even if that `expr` is a + metavariable; as such, we panic if one of them is `none`. +-/ +partial def step (struct : Struct) : M Unit := + unless (← isRoundDone) do + withReader (fun ctx => { ctx with structs := ctx.structs.push struct }) do + for field in struct.fields do + match field.val with + | .nested struct => step struct + | _ => match field.expr? with + | none => unreachable! + | some expr => + match defaultMissing? expr with + | some (.mvar mvarId) => + unless (← mvarId.isAssigned) do + let ctx ← read + if (← withRef field.ref (tryToSynthesizeDefault + ctx.structs ctx.allStructNames ctx.maxDistance (getFieldName field) mvarId)) + then + modify fun _ => { progress := true } + | _ => pure () + +/-- + The workhorse of the default synthesis loop. + If there are no fields left that need to be synthesized during the default loop, we return from + the loop. + Otherwise, when we find a field that ought to be synthesized during the default loop, we take a + `step`. If we've made `progress`, we call `propagateLoop` again and reset the depth to `0`. If we + haven't, we call `propagateLoop` again with a higher depth. + If the depth ever exceeds the hierarchy depth, we know that we've searched all nested structures, + but no default values were to be found. In this case, we either throw an error with the missing + fields, or, if a variadic hole is present (e.g. `?..`), simply return from the loop (at which + point the remaining holes will be assigned by `assignRemainingDefaultsToFieldHoles` ). +-/ +partial def propagateLoop (hierarchyDepth : Nat) (d : Nat) (struct : Struct) : M Unit := do + match (← findDefaultMissing? struct) with + | none => return () -- Done + | some field => + trace[Elab.struct] "propagate [{d}] [field := {field}]: {struct}" + if d > hierarchyDepth then + let missingFields := (← allDefaultMissing struct).map getFieldName + if struct.source.implicit.isSome then + return () + else + let missingFieldsWithoutDefault := + let env := (← getEnv) + let structs := (← read).allStructNames + missingFields.filter fun fieldName => structs.all fun struct => + (getDefaultFnForField? env struct fieldName).isNone + let fieldsToReport := + if missingFieldsWithoutDefault.isEmpty then missingFields else missingFieldsWithoutDefault + throwErrorAt field.ref + "fields missing: {fieldsToReport.toList.map (s!"'{·}'") |> ", ".intercalate}" + else withReader (fun ctx => { ctx with maxDistance := d }) do + modify fun _ => { progress := false } + step struct + if (← get).progress then + propagateLoop hierarchyDepth 0 struct + else + propagateLoop hierarchyDepth (d+1) struct + +/-- + The default synthesis loop. + We call our workhorse function `propagateLoop` with appropriate initial values, which implements + the loop itself (unless there is a variadic hole that specifies defaults are not to be used). + Then, if there is a variadic hole, we assign the remaining metavariables that couldn't be + synthesized into default values to (named) field holes. +-/ +def propagate (struct : Struct) : TermElabM Unit := do + let hierarchyDepth := getHierarchyDepth struct + let structNames := collectStructNames struct #[] + let vhc? := struct.source.implicit + if vhc?.all (·.useDefaults) then + propagateLoop hierarchyDepth 0 struct { allStructNames := structNames } |>.run' {} + if vhc?.isSome then + assignRemainingDefaultsToFieldHoles struct + +end ImplicitFields + +/-- + The main content of the elaboration, during which we normalize the `Struct`'s form, call + `elabStruct` to compute field values and construct the elaborated expression, run the default + synthesis loop (and provide named field holes if warranted), and synthesize instances. -/ +private def elabStructInstAux (stx : Syntax) (expectedType? : Option Expr) (source : Source) +: TermElabM Expr := do + let structName ← getStructName expectedType? source + let struct ← liftMacroM <| mkStructView stx structName source + let struct ← expandStruct struct + trace[Elab.struct] "{struct}" + /- We try to synthesize pending problems with `withSynthesize` combinator before trying to use + default values. + This is important in examples such as + ``` + structure MyStruct where + {α : Type u} + {β : Type v} + a : α + b : β + #check { a := 10, b := true : MyStruct } + ``` + were the `α` will remain "unknown" until the default instance for `OfNat` is used to ensure + that `10` is a `Nat`. + TODO: investigate whether this design decision may have unintended side effects or produce + confusing behavior. + -/ + let { val := r, struct, instMVars } ← withSynthesize (mayPostpone := true) <| + elabStruct struct expectedType? + trace[Elab.struct] "before propagate {r}" + ImplicitFields.propagate struct + synthesizeAppInstMVars instMVars r + return r + +/-- The term elaborator for structure instance syntax that includes variadic holes (`?..`). -/ +@[term_elab structInstWithHoles] def elabStructInstWithHoles : TermElab := fun stx expectedType? => +do + match (← expandNonAtomicExplicitSources stx) with + | some stxNew => withMacroExpansion stx stxNew <| elabTerm stxNew expectedType? + | none => + let sourceView ← getStructSource stx + if let some modifyOp ← isModifyOp? stx then + if sourceView.explicit.isEmpty then + throwError + "invalid \{...} notation, explicit source is required when using '[] := '" + elabModifyOp stx modifyOp sourceView.explicit expectedType? + else + elabStructInstAux stx expectedType? sourceView + +section haveFieldProj + +/-- `as foo` names the field projection `foo`. -/ +declare_syntax_cat asname +/-- `as foo` names the field projection `foo`. -/ +syntax "as" ident : asname + +-- couldn't write elab "haveFieldProj" f:(ident)? x:("as" n:ident)? : tactic +/-- + Once a goal has been created for a structure's field via `?..` syntax, `haveFieldProj` can be + used equivalently to `have .proj := `. + `haveFieldProj f as a` gets the field projection for the field `f` and names it `a`; + `f` and `as a` can both be individually omitted. +-/ +elab "haveFieldProj" f:(ident)? x:(asname)? : tactic => do + let fieldHoleMData? := ImplicitFields.getFieldHoleMDataFromMVar? (← Tactic.getMainDecl) + match fieldHoleMData? with + | some fieldHoleMData => + let fieldName := match f with | some f' => f'.getId | none => fieldHoleMData.fieldName + let structName := fieldHoleMData.structName -- so the error fits on one line + let some projname := + (getProjFnForField? (← getEnv) fieldHoleMData.structName fieldName) | throwError + "couldn't find projection function for field {fieldName} of structure {structName}" + let name := match x with + | some stx => match stx with + | `(asname|as $n:ident) => n + | _ => mkIdent (fieldName ++ `proj) + | none => mkIdent (fieldName ++ `proj) + Tactic.evalTactic (←`(tactic|have $name := $(mkIdent projname))) + | none => throwError "no field metadata found on the main goal" + +end haveFieldProj diff --git a/server/adam/Adam/StructInstWithHolesTest.lean b/server/adam/Adam/StructInstWithHolesTest.lean new file mode 100644 index 0000000..12fdc8d --- /dev/null +++ b/server/adam/Adam/StructInstWithHolesTest.lean @@ -0,0 +1,117 @@ +import Adam.StructInstWithHoles +import Mathlib + + +example : Module ℚ ℝ := by + refine { ?..! } + exact fun a r => a * r + intro b + sorry + sorry + sorry + sorry + sorry + sorry + sorry + +structure Foo where + x : Nat := 0 + y : Nat + +structure Bar extends Foo where + z : Nat := x + +example := by refine { ?.. : Foo }; case y => exact 0 +example := by refine { ?.. : Bar }; case y => exact 0 +example := by refine { ?..a : Bar }; case a.y => exact 0 +example := by refine { ?..! : Bar }; case x | y | z => exact 0; +example := by refine { ?..!a : Bar }; case a.x | a.y | a.z => exact 0; +-- example := by refine' { ... : Bar }; exact 0 +example := by refine' { .. : Bar }; exact 0; exact 0; exact 0 +-- example := by refine' { ..! : Bar }; exact 0; exact 0; exact 0 + +structure rflFoo where + x : Nat + y : Nat + xy : x = y := by rfl + +example := by refine { ?.. : rflFoo }; (case x | y => exact 0); case xy => rfl +example := by refine { ?..! : rflFoo }; (case x | y => exact 0); case xy => rfl + +structure autoFoo where + x : Nat := 0 + y : Nat := 0 + xy : x = y := by rfl + +example := { ?.. : autoFoo } +example := by refine { ?..! : autoFoo }; (case x | y => exact 0); case xy => rfl + +def f : Foo → Nat := fun _ => 0 +def ff : Foo → Foo → Unit := fun _ _ => () +def ffb : Foo → Bar → Unit := fun _ _ => () +def ffa : Foo → autoFoo → Unit := fun _ _ => () + +example := by refine { x := f { ?.. }, ?.. : Foo }; case y | y_1 => exact 0 +example := by refine { x := f { ?..x }, ?.. : Foo }; case x.y | y => exact 0 +example := by refine { x := f { ?.. }, ?..x : Foo }; case y | x.y => exact 0 +example := by refine { x := f { ?..x }, ?..x : Foo }; case x.y | x.y_1 => exact 0 + +example := by refine ff { ?.. } { ?.. }; case y | y_1 => exact 0 +example := by refine ff { ?..! } { ?.. }; case x | y | y_1 => exact 0 +example := by refine ffb { ?..! } { ?..! }; case x | y | x_1 | y_1 | z_1 => exact 0 +example := by refine ffa { ?..! } { ?..! }; (case x | y | x_1 | y_1 => exact 0); rfl + +structure Foo' where + x : Nat + +structure dFoo' where + x : Nat := 0 + +def ff' : Foo → Foo' → Unit := fun _ _ => () +def fdf' : Foo → dFoo' → Unit := fun _ _ => () + +example := by refine ff' { ?.. } { ?.. }; case y | x_1 => exact 0 +example := by refine fdf' { ?.. } { ?.. }; case y => exact 0 + +structure Fooα (α : Type) where + x : α + +example := by refine { ?.. : Fooα Nat}; case x => exact 0 + +structure Fooαi where + {α : Type} + x : α + +example := by refine { ?.. : Fooαi }; (case α => exact Nat); case x => exact 0 + +/- haveFieldProj tests (subject to be moved)-/ +section haveFieldProj + +structure Foo'' where + x : Bool + y : Nat + +def foo'': Foo'' := { x := true, y := 0 } + +example := by + refine { ?.. : Foo''}; + haveFieldProj; + case x => exact x.proj foo''; + case y => exact 0 +example := by + refine { ?.. : Foo''}; + haveFieldProj as a; + case x => exact a foo''; + case y => exact 0 +example := by + refine { ?.. : Foo''}; + haveFieldProj y; + case x => exact 0 == y.proj foo''; + case y => exact 0 +example := by + refine { ?.. : Foo''}; + haveFieldProj y as a; + case x => exact 0 == a foo''; + case y => exact 0 + +end haveFieldProj diff --git a/server/adam/Adam/TacticDocs.lean b/server/adam/Adam/TacticDocs.lean new file mode 100644 index 0000000..6a3b96d --- /dev/null +++ b/server/adam/Adam/TacticDocs.lean @@ -0,0 +1,566 @@ +import GameServer.Commands +import Adam.Tactics + +TacticDoc assumption +" +`assumption` sucht nach einer Annahme, die genau dem Goal entspricht. + +## Beispiel + +`assumption` sucht durch die Annahmen und merkt dass `h` genau mit dem Goal übereinstimmt. + +``` +Objekte + a b c d : ℕ + h : a + b = c + g : a * b = 16 + t : c = 12 +Goal + a + b = c +``` +" + +TacticDoc apply +" +`apply my_lemma` Versucht das Goal mit der Aussage des Lemmas zu unifizieren +und erstellt ein neues Goal pro Annahme des Lemmas, die noch zu zeigen ist. + +## Details +`apply` funktioniert gleichermassen für Lemmas wie für Implikationen +wie z.B. `(h : A → B)`. + +## Beispiel + +Gegeben folgendes Lemma: +``` +lemma Nat.eq_zero_of_le_zero {n : ℕ} (h : n ≤ 0) : n = 0 := by sorry +``` + +Und folgendes Problem: + +``` + +Objekte + n : ℕ + ... +Goal + n = 0 +``` + +Hier ändert `apply Nat.eq_zero_of_le_zero` das Goal zu `n ≤ 0` durch Anwendung +des Lemmas. +" + +TacticDoc by_cases +" +`by_cases h : P` macht eine Fallunterscheidung. Im ersten Goal wird eine Annahme +`(h : P)` hinzugefügt, im zweiten `(h : ¬P)`. + +## Details + +`P` kann eine beliegige Aussage sein, die als entweder wahr oder falsch angenommen wird. + +## Beispiel + +``` +example (A : Prop) : A ∨ ¬ A := by + by_cases h : A + · left + assumption + · right + assumption +``` +" + +TacticDoc by_contra +" +`by_contra h` startet einen Widerspruchsbeweis. + +## Details +Sei `P` das aktuelle Goal. `by_contra h` fügt eine neue Annahme `(h : ¬P)` hinzu +und setzt das Goal auf `False`. + +Oft will man `by_contra` nutzen wenn das Goal von der Form `¬ P` ist. + +## Hilfreiche Resultate + +* `contradiction` schliesst den Widerspruchsbeweis wenn sich (zwei) Annahmen +widersprechen. +* `contrapose` führt einen Beweis durch Kontraposition und ist entsprechend +in ähnlichen Situationen nutzbar wie `by_contra` +" + +TacticDoc change +" +`change t` ändert das Goal zu `t`. Voraussetzung ist, dass `t` und das alte Goal defEq sind. + +## Details + +Dies ist insbesonder hilfreich wenn eine Taktik nicht merkt, dass das Goal defEq ist zu einem +Term, der eigentlich gebraucht würde. + +## Beispiel + +Aktuelles Goal: + +``` +b: ℝ +⊢ 1 • b = b +``` +Wobei die Skalarmultiplikation als `fun (a : ℚ) (r : ℝ) => ↑a * r` definiert war. Dann +kann man mit `change (1 : ℚ) * b = b` das Goal umschreiben und anschliessend mit Lemmas +über die Multiplikation beweisen. +" + +TacticDoc constructor +" +`constructor` teilt ein Goal auf, wenn das Goal eine Struktur ist + +## Detail +Wenn das Goal eine Struktur ist, wie z.B. `A ∧ B` welches zwei Felder hat `⟨A, B⟩`, dann +erzeugt `constructor` ein Goal pro Feld der Struktur. + +## Hilfreiche Resultate + +* Das Gegenteil von `constructor` ist `⟨_, _⟩` (`\\<>`), der *anonyme Konstructor*. +Dieser enspricht ungefähr der Tupel-Notation in +\"eine Gruppe ist ein Tupel $(G, 0, +)$, sodass …\". + +## Beispiel + +``` +example {A B : Prop} (h : A) (g : B) : A ∧ B := by + constructor + · assumption + · assumption +``` +" + +TacticDoc contradiction +" +`contradiction` schliesst den Beweis wenn es einen Widerspruch in den Annahmen findet. + +## Details +Ein Widerspruch in den Annahmen kann unter anderem folgendermassen aussehen: + +* `(h : n ≠ n)` +* `(h : A)` und `(h' : ¬A)` +* `(h : False)` (i.e. ein Beweis von `False`) + +## Beispiel + +Folgenes Goal wird von `contradiction` bewiesen + +## Hilfreiche Resultate + +* Normalerweise wird `contradiction` gebraucht um einen Widerspruchsbeweis zu + schliessen, der mit `by_contra` eröffnet wurde. +* Ein Beweis von `False` representiert in Lean einen Widerspruch. + +``` +Objekte: + (n m : ℕ) + (h : n = m) + (g : n ≠ m) +Goal + 37 = 60 +``` +nach dem Motto \"ein Widerspruch beweist alles.\" +" + +TacticDoc contrapose +" +`contrapose` ändert ein Goal der Form `A → B` zu `¬B → ¬A` und führt damit +eine Beweis durch Kontraposition. + +## Hilfreiche Resultate + +* `revert h` kann nützlich sein um eine Annahme als Implikationsprämisse zu schreiben bevor man + `contrapose` verwendet. +" + +TacticDoc exact +" +`exact h` schliesst das Goal wenn der Term `h` mit dem Goal übereinstimmt. +" + +TacticDoc fin_cases +" +`fin_cases i` führt eine Fallunterscheidung wenn `i` ein endlicher Typ ist. + +## Details +`fin_cases i` ist insbesondere nützlich für `(i : Fin n)`, zum Beispiel als Index in +endlich dimensionalen Vektorräumen. + +In diesem Fall bewirkt `fin_cases i` dass man Komponentenweise arbeitet. +" + +TacticDoc funext +" +`funext x` wird bei Gleichungen von Funktionen `f = g` gebraucht. Das Goal wird zu +`f x = g x`. + +## Details +Nach dem Motto `f = g ↔ ∀ x, f x = g x` sind zwei Funktionen dann identisch, wenn sie +angewendet auf jedes Element identisch sind. `funext x` benützt dieses Argument. +" + +TacticDoc «have» +" +`have h : P` führt ein Zwischenresultat ein. + +## Details +Anschliessend muss man zuerst dieses Zwischenresultat beweisen bevor man mit dem Beweis +weitermachen und das Zwischenresultat verwenden kann. + +## Hilfreiche Resultate + +* `suffices h : P` funktioniert genau gleich, aussert das die beiden entstehenden Beweise + vertauscht sind. +* `let h : Prop := A ∧ B` ist verwandt mit `have`, mit Unterschied, dass man mit `let` + eine temporäre Definition einführt. +" + +TacticDoc induction +" +`induction n` führt einen Induktionsbeweis über `n`. + +## Detail + +Diese Taktik erstellt zwei Goals: +* Induktionsanfang, wo `n = 0` ersetzt wird. +* Induktionsschritt, in dem man die Induktionshypothese `n_ih` zur Verfügung hat. + +Der volle Syntax mit Option zum umbenennen der Induktionshypothes und -variable ist + +``` +induction n with +| zero => + sorry +| succ m m_ih => + sorry +``` + +da dieser sich über mehrere Zeilen erstreckt wird er im Spiel nicht eingeführt. + +## Hifreiche Resultate + +* `Nat.succ_eq_add_one`: schreibt `n.succ = n + 1` um. +* `Nat.zero_eq`: schreibt `Nat.zero = 0` um. + +Beide sind DefEq, aber manche Taktiken können nicht damit umgehen + +* Siehe Definition `∑` für Hilfe mit Induktion über Summen. +* `rcases n` ist sehr ähnlich zu `induction n`. Der Unterschied ist, dass bei +`rcases` keine Induktionshypothese im Fall `n + 1` zur Verfügung steht. + +## Beispiel + +``` +example (n : ℕ) : 4 ∣ 5^n + 7 := by + induction n + sorry -- Fall `n = 0` + sorry -- Fall `n + 1` +``` +" + +TacticDoc intro +" +`intro x` wird für Goals der Form `A → B` oder `∀ x, P x` verwendet. +Dadurch wird die Implikationsprämisse (oder das Objekt `x`) den Annahmen hinzugefügt. + +## Hilfreiche Resultate + +* `revert h` macht das Gegenteil von `intro`. +" + +TacticDoc left +" +Wenn das Goal von der Form `A ∨ B` ist, enscheidet man mit `left` die linke Seite zu zeigen. + +## Hilfreiche Resultate + +* `right` entscheidet sich für die linke Seite. +" + +TacticDoc «let» +" +`let x : ℕ := 5 ^ 2` führt eine neue temporäre Definition ein. + +## Hilfreiche Resultate + +* `have x : ℕ := 5 ^ 2` führt ebenfalls eine neue natürliche Zahle `x` ein, aber + Lean vergisst sofort, wie die Zahl definiert war. D.h. `x = 25` wäre dann nicht + beweisbar. Mit `let x : ℕ := 5 ^ 2` ist `x = 25` durch `rfl` beweisbar. +" + +TacticDoc linarith +" +`linarith` löst Systeme linearer (Un-)Gleichungen. + +## Detail +`linarith` kann lineare Gleichungen und Ungleichungen beweisen indem +es das Gegenteil vom Goal annimmt und versucht einen Widerspruch in den +Annahmen zu erzeugen (Widerspruchsbeweis). Es braucht ein `≤` definiert um +zu funktionieren. + +## Beispiel + +Folgendes kann `linarith` beweisen. +``` +Objekte + x y : ℤ + h₁ : 5 * y ≤ 35 - 2 * x + h₂ : 2 * y ≤ x + 3 +Goal + y ≤ 5 +``` +" + +TacticDoc push_neg +" +`push_neg` schreibt `¬∀ x, _` zu `∃ x, ¬ _` und `¬∃ x, _` zu `∀x, ¬ _` um. + +## Details + +`psuh_neg` schiebt das `¬` soweit nach innen wie möglich. + +## Hilfreiche Resultate + +* Die beiden Lemmas heissen `not_forall` und `not_exists` und können mit `rw` einzeln angewendet + werden. +" + +TacticDoc rcases +" +`rcases h` teilt eine Annahme `h` in ihre Einzelteile auf. + +## Details +Für Annahmen die Strukturen sind, wie z.B. `h : A ∧ B` (oder `∃x, P x`) kann man die +Einzelteile mit `rcases h with ⟨a, b⟩` (oder `rcases h with ⟨x, hx⟩`) benennen. + +Für eine Annahme der Form `h : A ∨ B` kann man mit `rcases h with ha | hb` zwei Goals +erzeugen, einmal unter Annahme der linken Seite, einmal unter Annahme der Rechten. + +## Hilfreiche Resultate + +* Für `n : ℕ` hat `rcases n` einen ähnlichen Effekt wie `induction n` mit dem Unterschied, + dass im Fall `n + 1` keine Induktionshypothese zur Verfügung steht. +* In Lean gibt es auch die Taktik `cases`, die gleich funktioniert wie `rcases` aber + einen mehrzeiligen Syntax hat: + ``` + cases h with + | inl ha => + sorry + | inr hb => + sorry + ``` + Hier sind `inl`/`inr` die Namen der Fälle und `ha`/`hb` sind frei gewählte Namen für die + freien Variablen +" + +TacticDoc refine +" +`refine { ?..! }` wird benötigt um eine Struktur (z.B. ein $R$-Modul) im Taktikmodus in einzelne +Goals aufzuteilen. Danach hat man ein Goal pro Strukturfeld. + +(*Bemerkung*: Es gibt in Lean verschiedenste bessere Varianten dies zu erreichen, +z.B. \"Term Modus\" oder \"anonyme Konstruktoren\", aber für den Zweck des Spieles bleiben wir +bei diesem Syntax.) +" + +TacticDoc revert +" +`revert h` fügt die Annahme `h` als Implikationsprämisse vorne ans Goal an. + +## Hilfreiche Resultate + +* `revert` ist das Gegenteil von `intro`. +* `revert` kann insbesondere nützlich sein, um anschliessend `contrapose` zu verwenden. + +## Beispiel + +``` +Objekte + A P : Prop + h : P +Goal + A +``` + +hier ändert `revert h` den Status zu + +``` +Objekte + A P : Prop +Goal + P → A +``` +" + +TacticDoc rfl +" +`rfl` beweist ein Goal der Form `X = X`. + +## Detail + +`rfl` beweist jedes Goal `A = B` wenn `A` und `B` per Definition das gleiche sind (DefEq). +Andere Taktiken rufen `rfl` oft am Ende versteckt +automatisch auf um zu versuchen, den Beweis zu schliessen. + + +## Beispiel +`rfl` kann folgende Goals beweisen: + +``` +Objekte + a b c : ℕ +Goal: + (a + b) * c = (a + b) * c +``` + +``` +Objekte + n : ℕ +Goal + 1 + 1 = 2 +``` +denn Lean liest dies intern als `0.succ.succ = 0.succ.succ`. +" + +TacticDoc right +" +Wenn das Goal von der Form `A ∨ B` ist, enscheidet man mit `right` die rechte Seite zu zeigen. + +## Hilfreiche Resultate + +* `left` entscheidet sich für die linke Seite. +" + +TacticDoc ring +" +Löst Gleichungen mit den Operationen `+, -, *, ^`. + +## Details +Insbesondere funktioniert `ring` in Ringen/Semiringen wie z.B. `ℕ, ℤ, ℚ, …` +(i.e. Typen `R` mit Instanzen `Ring R` oder `Semiring R`). +Die Taktik ist besonders auf kommutative Ringe (`CommRing R`) ausgelegt. + +## Hilfreiche Resultate + +* `ring` kann nicht wirklich mit Division (`/`) oder Inversen (`⁻¹`) umgehen. Dafür ist die + Taktik `field_simp` gedacht, und die typische Sequenz ist + ``` + field_simp + ring + ``` +* Wenn `ring` nicht abschliesst, sagt es man solle `ring_nf` verwenden. Normalerweise heisst + das aber, dass man was falsch gemacht hat und die Seiten der Gleichung noch nicht gleich sind. +" + +TacticDoc rw +" +Wenn man eine Annahme `(h : X = Y)` hat, kann man mit +`rw [h]` alle `X` im Goal durch `Y` ersetzen. + +## Details + +* `rw [←h]` wendet `h` rückwärts an und ersetzt alle `Y` durch `X`. +* `rw [h, g, ←f]`: Man kann auch mehrere `rw` zusammenfassen. +* `rw [h] at h₂` ersetzt alle `X` in `h₂` zu `Y` (anstatt im Goal). + +`rw` funktioniert gleichermassen mit Annahmen `(h : X = Y)` also auch +mit Theoremen/Lemmas der Form `X = Y` +" + +TacticDoc simp +" +`simp` versucht alle Vereinfachungslemmas anzuwenden, die in der `mathlib` mit `@[simp]` +gekennzeichnet sind. + +## Details + +* `simp?` zeigt welche Lemmas verwendet wurden. +* `simp [my_lemma]` fügt zudem `my_lemma` temporär zur Menge der `simp`-Lemmas hinzu. +* ein `simp`, das nicht am Ende des Beweis steht sollte durch eine entsprechende + `simp only [...]` Aussage ersetzt werden, um den Beweis stabiler zu machen. +" + +TacticDoc simp_rw +" +`simp_rw [h₁, h₂, h₃]` versucht wie `rw` jedes Lemma der Reihe nach zu Umschreiben zu verwenden, +verwendet aber jedes Lemma so oft es kann. + +## Details + +Es bestehen aber drei grosse Unterschiede zu `rw`: + +* `simp_rw` wendet jedes Lemma so oft an wie es nur kann. +* `simp_rw` kann besser unter Quantifiern umschreiben als `rw`. +* `simp_rw` führt nach jedem Schritt ein `simp only []` aus und vereinfacht dadurch grundlegenste + Sachen. +" + +TacticDoc «suffices» +" +`suffices h : P` führt ein neues Zwischenresultat ein, aus dem das Goal direkt folgen soll. + +## Details + +Der einzige Unterschied zu `have h : P` ist, dass die beiden resultierenden Goals vertauscht sind. + +Mathematisch braucht man diese in ein bisschen unterschiedlichen Fällen: + +* `suffices h : P` : \"Es genügt zu zeigen, dass …\". Als erstes folgt die Erklärung wieso + das genügt, danach muss man nur noch `P` beweisen. +* `have h : P` : Ein (kleines) Zwischenresultat. Als erstes folgt dann der Beweis dieses +Resultats, anschliessend setzt man den Beweis mit Hilfe des Zwischenresultats fort. +" + +TacticDoc tauto +" +## Beschreibung + +TODO +" + +TacticDoc trivial +" +`trivial` versucht durch Kombination von wenigen simplen Taktiken das Goal zu schliessen. + +## Details +Die Taktiken, die verwendet werden sind: + +* `assumption` +* `rfl` +* `contradiction` +* und noch 3 andere, die hier nicht behandelt werden + (`decide`, `apply True.intro`, `apply And.intro`). +" + +TacticDoc unfold +" +`unfold myDef` öffnet eine Definition im Goal. + +## Details +Bis auf DefEq (definitinal equality) ändert `unfold` nichts, manche Taktiken +(z.B. `push_neg`, `rw`) brauchen aber manchmal die Hilfe. + +`unfold myDef at h` kann auch Definitionen in Annahmen öffnen + +## Hilfreiche Resultate + +* `change P` ist eine andere Taktik, die das aktuelle Goal in einen DefEq-Ausdruck umschreibt. + Diese Taktik braucht man auch manchmal um zu hacken, wenn Lean Mühe hat etwas zu verstehen. +" + +TacticDoc use +" +Wenn das Goal von der Form `∃x, P x` ist, kann man mit `use n` ein konkretes Element angeben +mit dem man das Goal beweisen möchte. + +## Details + +`use n` versucht zudem anschliessend `rfl` aufzurufen, und kann das Goal damit manchmal direkt +schließen. +" diff --git a/server/testgame/TestGame/Tactics.lean b/server/adam/Adam/Tactics.lean similarity index 92% rename from server/testgame/TestGame/Tactics.lean rename to server/adam/Adam/Tactics.lean index 5e95bfc..d5dfd4b 100644 --- a/server/testgame/TestGame/Tactics.lean +++ b/server/adam/Adam/Tactics.lean @@ -1,5 +1,5 @@ import Lean --- import TestGame.MyNat +-- import Adam.MyNat open Lean Elab Tactic diff --git a/server/testgame/TestGame/ToBePorted.lean b/server/adam/Adam/ToBePorted.lean similarity index 80% rename from server/testgame/TestGame/ToBePorted.lean rename to server/adam/Adam/ToBePorted.lean index 9e01935..7c66039 100644 --- a/server/testgame/TestGame/ToBePorted.lean +++ b/server/adam/Adam/ToBePorted.lean @@ -1,5 +1,28 @@ import Mathlib +open BigOperators + +/-! # Delab Problems -/ + +open Lean PrettyPrinter Delaborator SubExpr + +@[delab app.Finset.sum] +def delabFinsetSum : Delab := do + guard $ (← getExpr).getAppNumArgs == 5 + guard $ ((← getExpr).getArg! 3).isAppOf' ``Finset.univ + guard $ ((← getExpr).getArg! 4).isLambda + withNaryArg 4 do + let α ← withBindingDomain delab + withBindingBodyUnusedName fun n => do + let n : TSyntax `ident := ⟨n⟩ + let b ← delab + `(∑ $n:ident : $α, $b) + + + + +/-! # Other Stuff -/ + -- lemma not_odd {n : ℕ} : ¬ Odd n ↔ Even n := by -- sorry diff --git a/server/testgame/gameserver b/server/adam/gameserver similarity index 100% rename from server/testgame/gameserver rename to server/adam/gameserver diff --git a/server/testgame/lake-manifest.json b/server/adam/lake-manifest.json similarity index 100% rename from server/testgame/lake-manifest.json rename to server/adam/lake-manifest.json diff --git a/server/testgame/lakefile.lean b/server/adam/lakefile.lean similarity index 85% rename from server/testgame/lakefile.lean rename to server/adam/lakefile.lean index 9ea11dc..d33792a 100644 --- a/server/testgame/lakefile.lean +++ b/server/adam/lakefile.lean @@ -6,9 +6,9 @@ require GameServer from ".."/"leanserver" require mathlib from git "https://github.com/leanprover-community/mathlib4.git"@"master" -package TestGame +package Adam @[default_target] -lean_lib TestGame { +lean_lib Adam { moreLeanArgs := #["-DautoImplicit=false"] } diff --git a/server/testgame/lean-toolchain b/server/adam/lean-toolchain similarity index 100% rename from server/testgame/lean-toolchain rename to server/adam/lean-toolchain diff --git a/server/build.sh b/server/build.sh index bc3f11a..21941ea 100644 --- a/server/build.sh +++ b/server/build.sh @@ -6,6 +6,16 @@ cd $(dirname $0) # Build elan image if not already present docker build --pull --rm -f elan.Dockerfile -t elan:latest . -(cd testgame && lake exe cache get && lake build) -docker rmi testgame:latest || true -docker build --rm -f server.Dockerfile -t testgame:latest . +# Build adam +(cd adam && lake exe cache get && lake build) +docker rmi adam:latest || true +docker build \ + --build-arg GAME_DIR=adam \ + --rm -f server.Dockerfile -t adam:latest . + +# Build NNG +(cd nng && lake build) +docker rmi nng:latest || true +docker build \ + --build-arg GAME_DIR=nng \ + --rm -f server.Dockerfile -t nng:latest . diff --git a/server/index.mjs b/server/index.mjs index a07dab6..cdb6db9 100644 --- a/server/index.mjs +++ b/server/index.mjs @@ -6,6 +6,18 @@ import * as url from 'url'; import * as rpc from 'vscode-ws-jsonrpc'; import * as jsonrpcserver from 'vscode-ws-jsonrpc/server'; +const games = { + adam: { + name: "Adam", + module: "Adam", + queueLength: 5 + }, + nng: { + name: "NNG", + module: "NNG", + queueLength: 5 + } +} const __filename = url.fileURLToPath(import.meta.url); const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); @@ -23,23 +35,19 @@ const wss = new WebSocketServer({ server }) const environment = process.env.NODE_ENV const isDevelopment = environment === 'development' -let cmd, cmdArgs, cwd; -if (isDevelopment) { - cmd = "./gameserver"; - cmdArgs = ["--server"]; - cwd = "./leanserver/build/bin/" -} else{ - cmd = "docker"; - cmdArgs = ["run", "--runtime=runsc", "--network=none", "--rm", "-i", "testgame:latest"]; - cwd = "." -} - -/** We keep a queue of started Lean Server processes to be ready when a user arrives */ -const queue = [] +/** We keep queues of started Lean Server processes to be ready when a user arrives */ +const queue = {} const queueLength = 5 -function startServerProcess() { - const serverProcess = cp.spawn(cmd, cmdArgs, { cwd }) +function startServerProcess(gameId) { + const serverProcess = isDevelopment + ? cp.spawn("./gameserver", + ["--server", gameId, games[gameId].module, games[gameId].name], + { cwd: "./leanserver/build/bin/" }) + : cp.spawn("docker", + ["run", "--runtime=runsc", "--network=none", "--rm", "-i", `${gameId}:latest`, + "./gameserver", "--server", gameId, games[gameId].module, games[gameId].name], + { cwd: "." }) serverProcess.on('error', error => console.error(`Launching Lean Server failed: ${error}`) ); @@ -52,22 +60,32 @@ function startServerProcess() { } /** start Lean Server processes to refill the queue */ -function fillQueue() { - while (queue.length < queueLength) { - const serverProcess = startServerProcess() - queue.push(serverProcess) +function fillQueue(gameId) { + while (queue[gameId].length < games[gameId].queueLength) { + const serverProcess = startServerProcess(gameId) + queue[gameId].push(serverProcess) } } -fillQueue() +for (let gameId in games) { + queue[gameId] = [] + fillQueue(gameId) +} + +const urlRegEx = new RegExp("^/websocket/(.*)$") + +wss.addListener("connection", function(ws, req) { + const reRes = urlRegEx.exec(req.url) + if (!reRes) { console.error(`Connection refused because of invalid URL: ${req.url}`); return; } + const gameId = reRes[1] + if (!games[gameId]) { console.error(`Unknown game: ${gameId}`); return; } -wss.addListener("connection", function(ws) { let ps; if (isDevelopment) { // Don't use queue in development - ps = startServerProcess() + ps = startServerProcess(gameId) } else { - ps = queue.shift() // Pick the first Lean process; it's likely to be ready immediately - fillQueue() + ps = queue[gameId].shift() // Pick the first Lean process; it's likely to be ready immediately + fillQueue(gameId) } const socket = { diff --git a/server/leanserver/GameServer/Commands.lean b/server/leanserver/GameServer/Commands.lean index fd1044c..65f9cf5 100644 --- a/server/leanserver/GameServer/Commands.lean +++ b/server/leanserver/GameServer/Commands.lean @@ -1,7 +1,6 @@ import Lean import GameServer.EnvExtensions -import GameServer.StrInterpolation open Lean Meta @@ -62,14 +61,44 @@ partial def reprintCore : Syntax → Option Format def reprint (stx : Syntax) : Format := reprintCore stx |>.getD "" -syntax hintArg := " (" (&"strict" <|> &"hidden") " := " withoutPosition(term) ")" +syntax hintArg := atomic(" (" (&"strict" <|> &"hidden") " := " withoutPosition(term) ")") + +/-- Remove any spaces at the beginning of a new line -/ +partial def removeIndentation (s : String) : String := + let rec loop (i : String.Pos) (acc : String) (removeSpaces := false) : String := + let c := s.get i + let i := s.next i + if s.atEnd i then + acc.push c + else if removeSpaces && c == ' ' then + loop i acc (removeSpaces := true) + else if c == '\n' then + loop i (acc.push c) (removeSpaces := true) + else + loop i (acc.push c) + loop ⟨0⟩ "" /-- A tactic that can be used inside `Statement`s to indicate in which proof states players should see hints. The tactic does not affect the goal state. -/ -elab "Hint" args:hintArg* msg:Lean.Parser.interpolatedStrNoIndent : tactic => do +elab "Hint" args:hintArg* msg:interpolatedStr(term) : tactic => do let mut strict := false let mut hidden := false + -- remove spaces at the beginngng of new lines + let msg := TSyntax.mk $ msg.raw.setArgs $ ← msg.raw.getArgs.mapM fun m => do + match m with + | Syntax.node info k args => + logInfo k + if k == interpolatedStrLitKind && args.size == 1 then + match args.get! 0 with + | (Syntax.atom info' val) => + let val := removeIndentation val + return Syntax.node info k #[Syntax.atom info' val] + | _ => return m + else + return m + | _ => return m + for arg in args do match arg with | `(hintArg| (strict := true)) => strict := true @@ -85,7 +114,7 @@ elab "Hint" args:hintArg* msg:Lean.Parser.interpolatedStrNoIndent : tactic => do -- named differently by the player. let varsName := `vars let text ← withLocalDeclD varsName (mkApp (mkConst ``Array [levelZero]) (mkConst ``Expr)) fun vars => do - let mut text ← expandInterpolatedStr ⟨msg.raw⟩ (← `(MessageData)) (← `(toMessageData)) + let mut text ← `(m! $msg) let goalDecl ← goal.getDecl let decls := goalDecl.lctx.decls.toArray.filterMap id for i in [:decls.size] do @@ -274,14 +303,21 @@ def checkInventoryDoc (type : InventoryType) (name : Name) : CommandElabM Unit : /-! ### Tactics -/ -/-- Declare a documentation entry for some tactic. -Expect an identifier and then a string literal. -/ +/-- Documentation entry of a tactic. Example: + +``` +TacticDoc rw "`rw` stands for rewrite, etc. " +``` + +* The identifier is the tactics name. Some need to be escaped like `«have»`. +* The description is a string supporting Markdown. + -/ elab "TacticDoc" name:ident content:str : command => modifyEnv (inventoryDocExt.addEntry · { category := default type := .Tactic name := name.getId, - userName := name.getId, + displayName := name.getId.toString, content := content.getString }) /-- Declare tactics that are introduced by this level. -/ @@ -304,14 +340,23 @@ elab "OnlyTactic" args:ident* : command => do /-! ### Definitions -/ -/-- Declare a documentation entry for some definition. -Expect an identifier and then a string literal. -/ -elab "DefinitionDoc" name:ident content:str : command => +/-- Documentation entry of a definition. Example: + +``` +DefinitionDoc Function.Bijective as "Bijective" "defined as `Injective f ∧ Surjective`, etc." +``` + +* The first identifier is used in the commands `[New/Only/Disabled]Definition`. + It is preferably the true name of the definition. However, this is not required. +* The string following `as` is the displayed name (in the Inventory). +* The description is a string supporting Markdown. + -/ +elab "DefinitionDoc" name:ident "as" displayName:str content:str : command => modifyEnv (inventoryDocExt.addEntry · { category := default type := .Definition name := name.getId, - userName := name.getId, + displayName := displayName.getString, content := content.getString }) /-- Declare definitions that are introduced by this level. -/ @@ -335,15 +380,23 @@ elab "OnlyDefinition" args:ident* : command => do /-! ### Lemmas -/ -/-- Declare a documentation entry for some lemma. -Expect two identifiers and then a string literal. The first identifier is meant -as the real name of the lemma while the second is the displayed name. Currently -the real name isn't used. -/ -elab "LemmaDoc" name:ident "as" userName:ident "in" category:str content:str : command => +/-- Documentation entry of a lemma. Example: + +``` +LemmaDoc Nat.succ_pos as "succ_pos" in "Nat" "says `0 < n.succ`, etc." +``` + +* The first identifier is used in the commands `[New/Only/Disabled]Lemma`. + It is preferably the true name of the lemma. However, this is not required. +* The string following `as` is the displayed name (in the Inventory). +* The identifier after `in` is the category to group lemmas by (in the Inventory). +* The description is a string supporting Markdown. + -/ +elab "LemmaDoc" name:ident "as" displayName:str "in" category:str content:str : command => modifyEnv (inventoryDocExt.addEntry · { name := name.getId, type := .Lemma - userName := userName.getId, + displayName := displayName.getString, category := category.getString, content := content.getString }) @@ -401,9 +454,11 @@ elab "MakeGame" : command => do let Availability₀ : HashMap Name ComputedInventoryItem := HashMap.ofList $ ← allItems.toList.mapM fun name => do + let data := (← getInventoryDoc? name inventoryType).get! return (name, { name - category := (← getInventoryDoc? name inventoryType).get!.category + displayName := data.displayName + category := data.category locked := true disabled := false}) @@ -414,9 +469,11 @@ elab "MakeGame" : command => do let predecessors := game.worlds.predecessors worldId for predWorldId in predecessors do for item in newItemsInWorld.find! predWorldId do + let data := (← getInventoryDoc? item inventoryType).get! items := items.insert item { name := item - category := (← getInventoryDoc? item inventoryType).get!.category + displayName := data.displayName + category := data.category locked := false disabled := false } @@ -429,13 +486,25 @@ elab "MakeGame" : command => do for (levelId, level) in levels do for item in (level.getInventory inventoryType).new do - let category := (← getInventoryDoc? item inventoryType).get!.category - items := items.insert item {name := item, category, locked := false, disabled := false} + let data := (← getInventoryDoc? item inventoryType).get! + items := items.insert item { + name := item + displayName := data.displayName + category := data.category + locked := false + disabled := false + } let mut disabled : HashSet Name := {} for item in (level.getInventory inventoryType).disabled do - let category := (← getInventoryDoc? item inventoryType).get!.category - items := items.insert item {name := item, category, locked := false, disabled := false} + let data := (← getInventoryDoc? item inventoryType).get! + items := items.insert item { + name := item + displayName := data.displayName + category := data.category + locked := false + disabled := false + } -- (we set disabled to false at first because it applies only to the current level) disabled := disabled.insert item diff --git a/server/leanserver/GameServer/EnvExtensions.lean b/server/leanserver/GameServer/EnvExtensions.lean index 95a2976..e6fd7a0 100644 --- a/server/leanserver/GameServer/EnvExtensions.lean +++ b/server/leanserver/GameServer/EnvExtensions.lean @@ -43,7 +43,7 @@ instance : ToString InventoryType := ⟨fun t => match t with structure InventoryDocEntry where name : Name type : InventoryType - userName : Name + displayName : String category : String content : String deriving ToJson, Repr, Inhabited @@ -122,6 +122,7 @@ deriving Inhabited structure ComputedInventoryItem where name : Name + displayName : String category : String locked : Bool disabled : Bool diff --git a/server/leanserver/GameServer/FileWorker.lean b/server/leanserver/GameServer/FileWorker.lean index 3326fa8..9075307 100644 --- a/server/leanserver/GameServer/FileWorker.lean +++ b/server/leanserver/GameServer/FileWorker.lean @@ -113,7 +113,7 @@ where addErrorMessage (info : SourceInfo) (s : MessageData) := open Elab Meta Expr in def compileProof (inputCtx : Parser.InputContext) (snap : Snapshot) (hasWidgets : Bool) - (couldBeEndSnap : Bool) (levelParams : Game.DidOpenLevelParams) : IO Snapshot := do + (couldBeEndSnap : Bool) (levelParams : Game.DidOpenLevelParams) (initParams : Lsp.InitializeParams): IO Snapshot := do -- Recognize end snap if inputCtx.input.atEnd snap.mpState.pos ∧ couldBeEndSnap then let endSnap : Snapshot := { @@ -142,7 +142,7 @@ def compileProof (inputCtx : Parser.InputContext) (snap : Snapshot) (hasWidgets let (output, _) ← IO.FS.withIsolatedStreams (isolateStderr := server.stderrAsMessages.get snap.cmdState.scopes.head!.opts) <| liftM (m := BaseIO) do Elab.Command.catchExceptions (getResetInfoTrees *> do - let some level ← GameServer.getLevelByFileName? inputCtx.fileName + let some level ← GameServer.getLevelByFileName? initParams inputCtx.fileName | throwError "Level not found: {inputCtx.fileName}" let scope := level.scope @@ -244,7 +244,8 @@ where hOut.writeLspNotification { method := "$/game/completed", param } /-- Elaborates the next command after `parentSnap` and emits diagnostics into `hOut`. -/ - private def nextSnap (ctx : WorkerContext) (m : DocumentMeta) (cancelTk : CancelToken) (levelParams : Game.DidOpenLevelParams) + private def nextSnap (ctx : WorkerContext) (m : DocumentMeta) (cancelTk : CancelToken) + (levelParams : Game.DidOpenLevelParams) (initParams : Lsp.InitializeParams) : AsyncElabM (Option Snapshot) := do cancelTk.check let s ← get @@ -261,7 +262,8 @@ where -- Make sure that there is at least one snap after the head snap, so that -- we can see the current goal even on an empty document let couldBeEndSnap := s.snaps.size > 1 - let snap ← compileProof m.mkInputContext lastSnap ctx.clientHasWidgets couldBeEndSnap levelParams + let snap ← compileProof m.mkInputContext lastSnap ctx.clientHasWidgets couldBeEndSnap + levelParams initParams set { s with snaps := s.snaps.push snap } -- TODO(MH): check for interrupt with increased precision cancelTk.check @@ -299,7 +301,7 @@ where publishIleanInfoUpdate m ctx.hOut snaps return AsyncList.ofList snaps.toList ++ AsyncList.delayed (← EIO.asTask (ε := ElabTaskError) (prio := .dedicated) do IO.sleep startAfterMs - AsyncList.unfoldAsync (nextSnap ctx m cancelTk levelParams) { snaps }) + AsyncList.unfoldAsync (nextSnap ctx m cancelTk levelParams ctx.initParams) { snaps }) end Elab @@ -362,8 +364,9 @@ section Initialization fileMap := default def compileHeader (m : DocumentMeta) (hOut : FS.Stream) (opts : Options) (hasWidgets : Bool) - (levelModule : Name) : IO (Syntax × Task (Except Error (Snapshot × SearchPath))) := do - let gameDir := "../../../testgame" + (levelModule : Name) (initParams : InitializeParams): IO (Syntax × Task (Except Error (Snapshot × SearchPath))) := do + let some gameDir := GameServer.gameDirFromInitParams initParams + | throwServerError s!"Invalid rootUri: {initParams.rootUri?}" -- Determine search paths of the game project by running `lake env printenv LEAN_PATH`. let out ← IO.Process.output @@ -426,7 +429,8 @@ section Initialization def initializeWorker (meta : DocumentMeta) (i o e : FS.Stream) (initParams : InitializeParams) (opts : Options) (levelParams : Game.DidOpenLevelParams) : IO (WorkerContext × WorkerState) := do let clientHasWidgets := initParams.initializationOptions?.bind (·.hasWidgets?) |>.getD false - let (headerStx, headerTask) ← compileHeader meta o opts (hasWidgets := clientHasWidgets) levelParams.levelModule + let (headerStx, headerTask) ← compileHeader meta o opts (hasWidgets := clientHasWidgets) + levelParams.levelModule initParams let cancelTk ← CancelToken.new let ctx := { hIn := i @@ -506,6 +510,7 @@ section MainLoop set st match msg with | Message.request id method (some params) => + if method == "Game.getInteractiveGoals" then throwServerError "HELLO" handleRequest id method (toJson params) mainLoop levelParams | Message.notification "exit" none => diff --git a/server/leanserver/GameServer/Game.lean b/server/leanserver/GameServer/Game.lean index 123269d..4e3681b 100644 --- a/server/leanserver/GameServer/Game.lean +++ b/server/leanserver/GameServer/Game.lean @@ -66,6 +66,7 @@ structure DidOpenLevelParams where structure Doc where name: String + displayName: String text: String deriving ToJson @@ -80,11 +81,11 @@ def handleDidOpenLevel (params : Json) : GameServerM Unit := do -- Execute the regular handling of the `didOpen` event handleDidOpen p let fw ← findFileWorker! m.uri - let s ← get + -- let s ← get let c ← read - let some lvl ← GameServer.getLevelByFileName? ((System.Uri.fileUriToPath? m.uri).getD m.uri |>.toString) + let some lvl ← GameServer.getLevelByFileName? c.initParams ((System.Uri.fileUriToPath? m.uri).getD m.uri |>.toString) | do - c.hLog.putStr s!"Level not found: {m.uri}" + c.hLog.putStr s!"Level not found: {m.uri} {c.initParams.rootUri?}" c.hLog.flush -- Send an extra notification to the file worker to inform it about the level data fw.stdin.writeLspNotification { @@ -132,7 +133,7 @@ partial def handleServerEvent (ev : ServerEvent) : GameServerM Bool := do return true | Message.request id "loadDoc" params => let p ← parseParams LoadDocParams (toJson params) - let s ← get + -- let s ← get let c ← read let some doc ← getInventoryDoc? p.name p.type | do @@ -140,6 +141,7 @@ partial def handleServerEvent (ev : ServerEvent) : GameServerM Bool := do return true let doc : Doc := { name := doc.name.toString + displayName := doc.displayName text := doc.content } c.hOut.writeLspResponse ⟨id, ToJson.toJson doc⟩ return true diff --git a/server/leanserver/GameServer/RpcHandlers.lean b/server/leanserver/GameServer/RpcHandlers.lean index 32f3931..78304a5 100644 --- a/server/leanserver/GameServer/RpcHandlers.lean +++ b/server/leanserver/GameServer/RpcHandlers.lean @@ -13,15 +13,26 @@ open Meta namespace GameServer -def levelIdFromFileName? (fileName : String) : Option LevelId := Id.run do +def splitRootUri (initParams : Lsp.InitializeParams) (i : Nat): Option String := Id.run do + let some rootUri := initParams.rootUri? + | return none + let rootUriParts := rootUri.splitOn "/" + if rootUriParts.length == 3 then + return rootUriParts[i]? + return none + +def levelIdFromFileName? (initParams : Lsp.InitializeParams) (fileName : String) : Option LevelId := Id.run do let fileParts := fileName.splitOn "/" if fileParts.length == 3 then - if let some level := fileParts[2]!.toNat? then - return some {game := `TestGame, world := fileParts[1]!, level := level} + if let (some level, some game) := (fileParts[2]!.toNat?, splitRootUri initParams 2) then + return some {game, world := fileParts[1]!, level := level} return none -def getLevelByFileName? [Monad m] [MonadEnv m] (fileName : String) : m (Option GameLevel) := do - let some levelId := levelIdFromFileName? fileName +def gameDirFromInitParams (initParams : Lsp.InitializeParams) : Option String := + (splitRootUri initParams 0).map (s!"../../../{·}") + +def getLevelByFileName? [Monad m] [MonadEnv m] (initParams : Lsp.InitializeParams) (fileName : String) : m (Option GameLevel) := do + let some levelId := levelIdFromFileName? initParams fileName | return none return ← getLevel? levelId @@ -114,9 +125,9 @@ def evalHintMessage : Expr → MetaM (Array Expr → MessageData) := fun _ => pu open Meta in /-- Find all hints whose trigger matches the current goal -/ -def findHints (goal : MVarId) (doc : FileWorker.EditableDocument) : MetaM (Array GameHint) := do +def findHints (goal : MVarId) (doc : FileWorker.EditableDocument) (initParams : Lsp.InitializeParams) : MetaM (Array GameHint) := do goal.withContext do - let some level ← getLevelByFileName? doc.meta.mkInputContext.fileName + let some level ← getLevelByFileName? initParams doc.meta.mkInputContext.fileName | throwError "Level not found: {doc.meta.mkInputContext.fileName}" let hints ← level.hints.filterMapM fun hint => do openAbstractCtxResult hint.goal fun hintFVars hintGoal => do @@ -137,6 +148,7 @@ def findHints (goal : MVarId) (doc : FileWorker.EditableDocument) : MetaM (Array open RequestM in def getInteractiveGoals (p : Lsp.PlainGoalParams) : RequestM (RequestTask (Option InteractiveGoals)) := do let doc ← readDoc + let rc ← readThe RequestContext let text := doc.meta.text let hoverPos := text.lspPosToUtf8Pos p.position -- TODO: I couldn't find a good condition to find the correct snap. So we are looking @@ -152,7 +164,7 @@ def getInteractiveGoals (p : Lsp.PlainGoalParams) : RequestM (RequestTask (Optio return List.toArray <| if useAfter then ti.goalsAfter else ti.goalsBefore let goals ← ci.runMetaM {} do goals.mapM fun goal => do - let hints ← findHints goal doc + let hints ← findHints goal doc rc.initParams return ← goalToInteractive goal hints -- compute the goal diff -- let goals ← ciAfter.runMetaM {} (do diff --git a/server/leanserver/GameServer/StrInterpolation.lean b/server/leanserver/GameServer/StrInterpolation.lean deleted file mode 100644 index db08b36..0000000 --- a/server/leanserver/GameServer/StrInterpolation.lean +++ /dev/null @@ -1,149 +0,0 @@ -/- Adapted from `Lean.Parser.StrInterpolation` - -This version of interpolated strings deletes any initial spaces from -new lines. This keeps Markdown from interpreting indented material -as quotes. --/ -import Lean -namespace Lean.Parser - -/-- Push `(Syntax.node tk )` onto syntax stack if parse was successful. -/ -def mkNodeTokenNoWs (n : SyntaxNodeKind) (startPos : String.Pos) : ParserFn := fun c s => Id.run do - if s.hasError then - return s - let input := c.input - let stopPos := s.pos - let leading := mkEmptySubstringAt input startPos - let val := input.extract startPos stopPos - let wsStopPos := s.pos - let trailing := { str := input, startPos := stopPos, stopPos := wsStopPos : Substring } - let info := SourceInfo.original leading startPos trailing stopPos - s.pushSyntax (Syntax.mkLit n val info) - -partial def interpolatedStrNoIndentFn (p : ParserFn) : ParserFn := fun c s => - let input := c.input - let stackSize := s.stackSize - let rec parse (startPos : String.Pos) (c : ParserContext) (s : ParserState) : ParserState := - let i := s.pos - if input.atEnd i then - let s := s.pushSyntax Syntax.missing - let s := s.mkNode interpolatedStrKind stackSize - s.setError "unterminated string literal" - else - let curr := input.get i - let s := s.setPos (input.next i) - if curr == '\"' then - let s := mkNodeToken interpolatedStrLitKind startPos c s - s.mkNode interpolatedStrKind stackSize - else if curr == '\n' then - -- Ignore initial spaces on a new line - let s := mkNodeTokenNoWs interpolatedStrLitKind startPos c s - let s := takeWhileFn (fun curr => curr == ' ') c s - parse s.pos c s - else if curr == '\\' then - andthenFn (quotedCharCoreFn isQuotableCharForStrInterpolant) (parse startPos) c s - else if curr == '{' then - let s := mkNodeToken interpolatedStrLitKind startPos c s - let s := p c s - if s.hasError then s - else - let i := s.pos - let curr := input.get i - if curr == '}' then - let s := s.setPos (input.next i) - parse i c s - else - let s := s.pushSyntax Syntax.missing - let s := s.mkNode interpolatedStrKind stackSize - s.setError "'}'" - else - parse startPos c s - let startPos := s.pos - if input.atEnd startPos then - s.mkEOIError - else - let curr := input.get s.pos; - if curr != '\"' then - s.mkError "interpolated string" - else - let s := s.next input startPos - parse startPos c s - -@[inline] def interpolatedStrNoIndentNoAntiquot (p : Parser) : Parser := { - fn := interpolatedStrNoIndentFn (withoutPosition p).fn, - info := mkAtomicInfo "interpolatedStrNoIndent" -} - -def interpolatedStrNoIndent : Parser := - withAntiquot (mkAntiquot "interpolatedStrNoIndent" interpolatedStrKind) $ interpolatedStrNoIndentNoAntiquot termParser - -open Lean.PrettyPrinter -open Lean.PrettyPrinter.Parenthesizer -open Lean.PrettyPrinter.Formatter - -@[combinator_parenthesizer interpolatedStrNoIndent] -def interpolatedStrNoIndent.parenthesizer := interpolatedStr.parenthesizer - -@[combinator_formatter interpolatedStrNoIndent] -def interpolatedStrNoIndent.formatter := interpolatedStr.formatter - -end Lean.Parser - - -/- Adapted from Init/Meta -/ -open Lean - -private def decodeInterpStrQuotedChar (s : String) (i : String.Pos) : Option (Char × String.Pos) := do - match Syntax.decodeQuotedChar s i with - | some r => some r - | none => - let c := s.get i - let i := s.next i - if c == '{' then pure ('{', i) - else none - -private partial def decodeInterpStrLit (s : String) : Option String := - let rec loop (i : String.Pos) (acc : String) : Option String := - let c := s.get i - let i := s.next i - if c == '\"' || c == '{' then - pure acc - else if c == '\n' then - pure (acc.push c) - else if s.atEnd i then - pure acc - else if c == '\\' then do - let (c, i) ← decodeInterpStrQuotedChar s i - loop i (acc.push c) - else - loop i (acc.push c) - let c := s.get 0 - if c == '\"' || c == '}' then - loop ⟨1⟩ "" - else - loop ⟨0⟩ "" -partial def isInterpolatedStrLit? (stx : Syntax) : Option String := - match Syntax.isLit? interpolatedStrLitKind stx with - | none => none - | some val => decodeInterpStrLit val - -open Elab - -def expandInterpolatedStrChunks (chunks : Array Syntax) (mkAppend : Syntax → Syntax → TermElabM Syntax) (mkElem : Syntax → TermElabM Syntax) : TermElabM Syntax := do - let mut i := 0 - let mut result := Syntax.missing - for elem in chunks do - let elem ← match isInterpolatedStrLit? elem with - | none => mkElem elem - | some str => mkElem (Syntax.mkStrLit str) - if i == 0 then - result := elem - else - result ← mkAppend result elem - i := i+1 - return result - -open TSyntax.Compat in -def expandInterpolatedStr (interpStr : TSyntax interpolatedStrKind) (type : Term) (toTypeFn : Term) : TermElabM Term := do - let r ← expandInterpolatedStrChunks interpStr.raw.getArgs (fun a b => `($a ++ $b)) (fun a => `($toTypeFn $a)) - `(($r : $type)) diff --git a/server/leanserver/GameServer/Watchdog.lean b/server/leanserver/GameServer/Watchdog.lean index 039a730..8b6cfca 100644 --- a/server/leanserver/GameServer/Watchdog.lean +++ b/server/leanserver/GameServer/Watchdog.lean @@ -1,6 +1,7 @@ /- This file is mostly copied from `Lean/Server/Watchdog.lean`. -/ import Lean import GameServer.Game +import Lean.Server.Watchdog namespace MyServer.Watchdog open Lean @@ -76,9 +77,7 @@ def initAndRunWatchdogAux : GameServerM Unit := do catch _ => pure (Message.notification "exit" none) | throwServerError "Got `shutdown` request, expected an `exit` notification" -def createEnv : IO Environment := do - let gameDir := "../../../testgame" - +def createEnv (gameDir : String) (module : String) : IO Environment := do -- Determine search paths of the game project by running `lake env printenv LEAN_PATH`. let out ← IO.Process.output { cwd := gameDir, cmd := "lake", args := #["env","printenv","LEAN_PATH"] } @@ -93,11 +92,17 @@ def createEnv : IO Environment := do -- Set the search path Lean.searchPathRef.set paths - let gameName := `TestGame - let env ← importModules [{ module := `Init : Import }, { module := gameName : Import }] {} 0 + let env ← importModules [{ module := `Init : Import }, { module := module : Import }] {} 0 return env def initAndRunWatchdog (args : List String) (i o e : FS.Stream) : IO Unit := do + if args.length < 4 then + throwServerError s!"Expected 3 command line arguments in addition to `--server`: + game directory, the name of the main module, and the name of the game" + let gameId := args[1]! + let gameDir := s!"../../../{gameId}" + let module := args[2]! + let gameName := args[3]! let workerPath := "./gameserver" -- TODO: Do the following commands slow us down? let srcSearchPath ← initSrcSearchPath (← getBuildDir) @@ -106,8 +111,11 @@ def initAndRunWatchdog (args : List String) (i o e : FS.Stream) : IO Unit := do let i ← maybeTee "wdIn.txt" false i let o ← maybeTee "wdOut.txt" true o let e ← maybeTee "wdErr.txt" true e - let state := {env := ← createEnv, game := `TestGame} + let state := {env := ← createEnv gameDir module, game := gameName} let initRequest ← i.readLspRequestAs "initialize" InitializeParams + -- We misuse the `rootUri` field to store gameId, module, and gameName + let rootUri? := s!"{gameId}/{module}/{gameName}" + let initRequest := {initRequest with param := {initRequest.param with rootUri?}} o.writeLspResponse { id := initRequest.id result := { diff --git a/server/leanserver/Main.lean b/server/leanserver/Main.lean index 993172c..39964b7 100644 --- a/server/leanserver/Main.lean +++ b/server/leanserver/Main.lean @@ -8,7 +8,7 @@ unsafe def main : List String → IO UInt32 := fun args => do Lean.enableInitializersExecution if args[0]? == some "--server" then - MyServer.Watchdog.watchdogMain [] + MyServer.Watchdog.watchdogMain args else if args[0]? == some "--worker" then MyServer.FileWorker.workerMain {} else diff --git a/server/nng/NNG.lean b/server/nng/NNG.lean new file mode 100644 index 0000000..f9dbac0 --- /dev/null +++ b/server/nng/NNG.lean @@ -0,0 +1,64 @@ +import GameServer.Commands + +import NNG.Levels.Tutorial +import NNG.Levels.Addition +import NNG.Levels.Multiplication +import NNG.Levels.Power +import NNG.Levels.Function +import NNG.Levels.Proposition +import NNG.Levels.AdvProposition +import NNG.Levels.AdvAddition +import NNG.Levels.AdvMultiplication +import NNG.Levels.Inequality + +Game "NNG" +Title "Natural Number Game" +Introduction +" +# Natural Number Game + +##### version 2.0.1 + +Welcome to the natural number game -- a game which shows the power of induction. + +In this game, you get own version of the natural numbers, in an interactive +theorem prover called Lean. Your version of the natural numbers satisfies something called +the principle of mathematical induction, and a couple of other things too (Peano's axioms). +Unfortunately, nobody has proved any theorems about these +natural numbers yet! For example, addition will be defined for you, +but nobody has proved that `x + y = y + x` yet. This is your job. You're going to +prove mathematical theorems using the Lean theorem prover. In other words, you're going to solve +levels in a computer game. + +You're going to prove these theorems using *tactics*. The introductory world, Tutorial World, +will take you through some of these tactics. During your proofs, the assistant shows your +\"goal\" (i.e. what you're supposed to be proving) and keeps track of the state of your proof. + +Click on the blue \"Tutorial World\" to start your journey! + +## Save progress + +The game stores your progress locally in your browser storage. +If you delete it, your progress will be lost! + +(usually the *website data* gets deleted together with cookies.) + +## Credits + +* **Content and Lean3-version:** Kevin Buzzard, Mohammad Pedramfar +* **Game Engine:** Alexander Bentkamp, Jon Eugster, Patrick Massot + +## Resources + +* The [Lean Zulip chat] forum +* [Original Lean3 version](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/) +* [A textbook-style (lean4) version of the NN-game](https://lovettsoftware.com/NaturalNumbers/TutorialWorld/Level1.lean.html) + +" + +Path Tutorial → Addition → Function → Proposition → AdvProposition → AdvAddition +Path AdvAddition → AdvMultiplication → Inequality +Path Addition → Multiplication → AdvMultiplication +Path Multiplication → Power + +MakeGame diff --git a/server/nng/NNG/Doc/Definitions.lean b/server/nng/NNG/Doc/Definitions.lean new file mode 100644 index 0000000..ec56a79 --- /dev/null +++ b/server/nng/NNG/Doc/Definitions.lean @@ -0,0 +1,6 @@ +import GameServer.Commands + +DefinitionDoc MyNat as "ℕ" +" +The Natural Numbers. +" \ No newline at end of file diff --git a/server/nng/NNG/Doc/Lemmas.lean b/server/nng/NNG/Doc/Lemmas.lean new file mode 100644 index 0000000..f7c4b03 --- /dev/null +++ b/server/nng/NNG/Doc/Lemmas.lean @@ -0,0 +1,31 @@ +import GameServer.Commands + +LemmaDoc MyNat.add_zero as "add_zero" in "Nat" +"" + +LemmaDoc MyNat.add_succ as "add_succ" in "Nat" +"" + +LemmaDoc MyNat.zero_add as "zero_add" in "Nat" +"" + +LemmaDoc MyNat.add_assoc as "add_assoc" in "Nat" +"" + +LemmaDoc MyNat.succ_add as "succ_add" in "Nat" +"" + +LemmaDoc MyNat.add_comm as "add_comm" in "Nat" +"" + +LemmaDoc MyNat.one_eq_succ_zero as "one_eq_succ_zero" in "Nat" +"" + +LemmaDoc not_iff_imp_false as "not_iff_imp_false" in "Prop" +"" + +LemmaDoc MyNat.succ_inj as "succ_inj" in "Nat" +"" + +LemmaDoc MyNat.zero_ne_succ as "zero_ne_succ" in "Nat" +"" diff --git a/server/nng/NNG/Doc/Tactics.lean b/server/nng/NNG/Doc/Tactics.lean new file mode 100644 index 0000000..e0b50a3 --- /dev/null +++ b/server/nng/NNG/Doc/Tactics.lean @@ -0,0 +1,57 @@ +import GameServer.Commands + +TacticDoc rfl +" +" + +TacticDoc rewrite +" +" + +TacticDoc rw +" +" + +TacticDoc induction +" +" + +TacticDoc exact +" +" + +TacticDoc apply +" +" + +TacticDoc intro +" +" + +TacticDoc «have» +" +" + +TacticDoc constructor +" +" + +TacticDoc rcases +" +" + +TacticDoc left +" +" + +TacticDoc right +" +" + +TacticDoc contradiction +" +" + +TacticDoc exfalso +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Addition.lean b/server/nng/NNG/Levels/Addition.lean new file mode 100644 index 0000000..84d3722 --- /dev/null +++ b/server/nng/NNG/Levels/Addition.lean @@ -0,0 +1,42 @@ +import NNG.Levels.Addition.Level_1 +import NNG.Levels.Addition.Level_2 +import NNG.Levels.Addition.Level_3 +import NNG.Levels.Addition.Level_4 +import NNG.Levels.Addition.Level_5 +import NNG.Levels.Addition.Level_6 + + +Game "NNG" +World "Addition" +Title "Addition World" + +Introduction +" +Welcome to Addition World. If you've done all four levels in tutorial world +and know about `rewrite` and `rfl`, then you're in the right place. Here's +a reminder of the things you're now equipped with which we'll need in this world. + +## Data: + + * a type called `ℕ` or `MyNat`. + * a term `0 : ℕ`, interpreted as the number zero. + * a function `succ : ℕ → ℕ`, with `succ n` interpreted as \"the number after `n`\". + * Usual numerical notation `0,1,2` etc. (although `2` onwards will be of no use to us until much later ;-) ). + * Addition (with notation `a + b`). + +## Theorems: + + * `add_zero (a : ℕ) : a + 0 = a`. Use with `rewrite [add_zero]`. + * `add_succ (a b : ℕ) : a + succ(b) = succ(a + b)`. Use with `rewrite [add_succ]`. + * The principle of mathematical induction. Use with `induction` (which we learn about in this chapter). + + +## Tactics: + + * `rfl` : proves goals of the form `X = X`. + * `rewrite [h]` : if `h` is a proof of `A = B`, changes all `A`'s in the goal to `B`'s. + * `induction n with d hd` : we're going to learn this right now. + + +You will also find all this information in your Inventory to read the documentation. +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Addition/Level_1.lean b/server/nng/NNG/Levels/Addition/Level_1.lean new file mode 100644 index 0000000..e6e849c --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_1.lean @@ -0,0 +1,93 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Addition" +Level 1 +Title "the induction tactic." + +open MyNat + +set_option tactic.hygienic false + +Introduction +" +OK so let's see induction in action. We're going to prove + +``` +zero_add (n : ℕ) : 0 + n = n +``` + +Wait… what is going on here? Didn't we already prove that adding zero to $n$ gave us $n$? + +No we didn't! We proved $n + 0 = n$, and that proof was called `add_zero`. We're now +trying to establish `zero_add`, the proof that $0 + n = n$. + +But aren't these two theorems the same? + +No they're not! It is *true* that `x + y = y + x`, but we haven't *proved* it yet, +and in fact we will need both `add_zero` and `zero_add` in order +to prove this. In fact `x + y = y + x` is the boss level for addition world, +and `induction` is the only other tactic you'll need to beat it. + +Now `add_zero` is one of Peano's axioms, so we don't need to prove it, we already have it. +To prove `0 + n = n` we need to use induction on $n$. While we're here, +note that `zero_add` is about zero add something, and `add_zero` is about something add zero. +The names of the proofs tell you what the theorems are. Anyway, let's prove `0 + n = n`. +" + +Statement zero_add +"For all natural numbers $n$, we have $0 + n = n$." + (n : ℕ) : 0 + n = n := by + Hint "You can start a proof by induction over `n` by typing: + `induction n with d hd`. + + If you use the `with` part, you can name your variable and induction hypothesis, otherwise + they get default names." + induction n with n hn + · Hint "Now you have two goals. Once you proved the first, you will jump to the second one. + This first goal is the base case $n = 0$. + + Recall that you can use all lemmas that are visible in your inventory." + Hint (hidden := true) "try using `add_zero`." + rw [add_zero] + rfl + · Hint "Now you jumped to the second goal. Here you have the induction hypothesis + `{hn} : 0 + {n} = {n}` and you need to prove the statement for `succ {n}`." + Hint (hidden := true) "look at `add_succ`." + rw [add_succ] + Hint (hidden := true) "At this point you see the term `0 + {n}`, so you can use the + induction hypothesis with `rw [{hn}]`." + rw [hn] + rfl + +NewTactic induction + +Conclusion +" +## Now venture off on your own. + +Those three tactics: + +* `induction n with d hd` +* `rw [h]` +* `rfl` + +will get you quite a long way through this game. Using only these tactics +you can beat Addition World level 4 (the boss level of Addition World), +all of Multiplication World including the boss level `a * b = b * a`, +and even all of Power World including the fiendish final boss. This route will +give you a good grounding in these three basic tactics; after that, if you +are still interested, there are other worlds to master, where you can learn +more tactics. + +But we're getting ahead of ourselves, you still have to beat the rest of Addition World. +We're going to stop explaining stuff carefully now. If you get stuck or want +to know more about Lean (e.g. how to do much harder maths in Lean), +ask in `#new members` at +[the Lean chat](https://leanprover.zulipchat.com) +(login required, real name preferred). Kevin or Mohammad or one of the other +people there might be able to help. + +Good luck! Click on \"Next\" to solve some levels on your own. +" diff --git a/server/nng/NNG/Levels/Addition/Level_2.lean b/server/nng/NNG/Levels/Addition/Level_2.lean new file mode 100644 index 0000000..d89e00f --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_2.lean @@ -0,0 +1,72 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Addition" +Level 2 +Title "add_assoc (associativity of addition)" + +open MyNat + +namespace AdditionWorld + +theorem zero_add (n : ℕ) : 0 + n = n := by + induction n with n hn + · rw [add_zero] + rfl + · rw [add_succ] + rw [hn] + rfl + +Introduction +" +It's well-known that $(1 + 2) + 3 = 1 + (2 + 3)$; if we have three numbers +to add up, it doesn't matter which of the additions we do first. This fact +is called *associativity of addition* by mathematicians, and it is *not* +obvious. For example, subtraction really is not associative: $(6 - 2) - 1$ +is really not equal to $6 - (2 - 1)$. We are going to have to prove +that addition, as defined the way we've defined it, is associative. + +See if you can prove associativity of addition. +" + +Statement add_assoc +"On the set of natural numbers, addition is associative. +In other words, for all natural numbers $a, b$ and $c$, we have +$ (a + b) + c = a + (b + c). $" + (a b c : ℕ) : (a + b) + c = a + (b + c) := by + Hint "Because addition was defined by recursion on the right-most variable, + use induction on the right-most variable (try other variables at your peril!). + + Note that when Lean writes `a + b + c`, it means `(a + b) + c`. If it wants to talk + about `a + (b + c)` it will put the brackets in explictly." + Branch + induction a + Hint "Good luck with that…" + rw [zero_add, zero_add] + rfl + Branch + induction b + Hint "Good luck with that…" + induction c with c hc + Hint (hidden := true) "look at the lemma `add_zero`." + rw [add_zero] + Hint "`rw [add_zero]` only rewrites one term of the form `… + 0`, so you might to + use it multiple times." + rw [add_zero] + rfl + Hint (hidden := true) "`add_succ` might help here." + rw [add_succ] + rw [add_succ] + rw [add_succ] + Hint (hidden := true) "Now you can use the induction hypothesis." + rw [hc] + rfl + + +Conclusion +" + +" + +NewLemma MyNat.zero_add \ No newline at end of file diff --git a/server/nng/NNG/Levels/Addition/Level_3.lean b/server/nng/NNG/Levels/Addition/Level_3.lean new file mode 100644 index 0000000..06d1fd1 --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_3.lean @@ -0,0 +1,68 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.Levels.Addition.Level_2 + +Game "NNG" +World "Addition" +Level 3 +Title "succ_add" + +open MyNat + +namespace AdditionWorld + +theorem add_assoc (a b c : ℕ) : (a + b) + c = a + (b + c) := by + induction c with c hc + · rw [add_zero] + rw [add_zero] + rfl + · rw [add_succ] + rw [add_succ] + rw [add_succ] + rw [hc] + rfl + +Introduction +" +Oh no! On the way to `add_comm`, a wild `succ_add` appears. `succ_add` +is the proof that `succ(a) + b = succ(a + b)` for `a` and `b` in your +natural number type. We need to prove this now, because we will need +to use this result in our proof that `a + b = b + a` in the next level. + +NB: think about why computer scientists called this result `succ_add` . +There is a logic to all the names. + +Note that if you want to be more precise about exactly where you want +to rewrite something like `add_succ` (the proof you already have), +you can do things like `rw [add_succ (succ a)]` or +`rw [add_succ (succ a) d]`, telling Lean explicitly what to use for +the input variables for the function `add_succ`. Indeed, `add_succ` +is a function: it takes as input two variables `a` and `b` and outputs a proof +that `a + succ(b) = succ(a + b)`. The tactic `rw [add_succ]` just says to Lean \"guess +what the variables are\". +" + +Statement succ_add +"For all natural numbers $a, b$, we have +$ \\operatorname{succ}(a) + b = \\operatorname{succ}(a + b)$." + (a b : ℕ) : succ a + b = succ (a + b) := by + Hint (hidden := true) "You might again want to start by induction + on the right-most variable." + Branch + induction a + Hint "Induction on `a` will not work." + induction b with d hd + · rw [add_zero] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [add_succ] + rfl + +NewLemma MyNat.add_assoc + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Addition/Level_4.lean b/server/nng/NNG/Levels/Addition/Level_4.lean new file mode 100644 index 0000000..e729fb7 --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_4.lean @@ -0,0 +1,63 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.Levels.Addition.Level_3 + +Game "NNG" +World "Addition" +Level 4 +Title "`add_comm` (boss level)" + +open MyNat + +namespace AdditionWorld + +theorem succ_add (a b : ℕ) : succ a + b = succ (a + b) := by + induction b with d hd + · rw [add_zero] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [add_succ] + rfl + +Introduction +" +[boss battle music] + +Look in your inventory to see the proofs you have available. +These should be enough. +" + +Statement add_comm +"On the set of natural numbers, addition is commutative. +In other words, for all natural numbers $a$ and $b$, we have +$a + b = b + a$." + (a b : ℕ) : a + b = b + a := by + Branch + induction a with d hd + · rw [zero_add] + rw [add_zero] + rfl + · rw [succ_add] + rw [hd] + rw [add_succ] + rfl + induction b with d hd + · rw [zero_add] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [succ_add] + rfl + +NewLemma MyNat.succ_add + +Conclusion +" +If you got this far -- nice! You're nearly ready to make a choice: +Multiplication World or Function World. But there are just a couple +more useful lemmas in Addition World which you should prove first. +Press on to level 5. +" diff --git a/server/nng/NNG/Levels/Addition/Level_5.lean b/server/nng/NNG/Levels/Addition/Level_5.lean new file mode 100644 index 0000000..9c13070 --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_5.lean @@ -0,0 +1,55 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.Levels.Addition.Level_4 + +Game "NNG" +World "Addition" +Level 5 +Title "succ_eq_add_one" + +open MyNat + +namespace AdditionWorld + +theorem add_comm (a b : ℕ) : a + b = b + a := by + induction b with d hd + · rw [zero_add] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [succ_add] + rfl + +theorem one_eq_succ_zero : (1 : ℕ) = succ 0 := by simp only + +NewLemma MyNat.add_comm MyNat.one_eq_succ_zero + +Introduction +" +I've just added `one_eq_succ_zero` (a proof of $1 = \\operatorname{succ}(0)$) +to your list of theorems; this is true +by definition of $1$, but we didn't need it until now. + +Levels 5 and 6 are the two last levels in Addition World. +Level 5 involves the number $1$. When you see a $1$ in your goal, +you can write `rw [one_eq_succ_zero]` to get back +to something which only mentions `0`. This is a good move because $0$ is easier for us to +manipulate than $1$ right now, because we have +some theorems about $0$ (`zero_add`, `add_zero`), but, other than `1 = succ 0`, +no theorems at all which mention $1$. Let's prove one now. +" + +Statement succ_eq_add_one +"For any natural number $n$, we have +$ \\operatorname{succ}(n) = n+1$ ." + (n : ℕ) : succ n = n + 1 := by + rw [one_eq_succ_zero] + rw [add_succ] + rw [add_zero] + rfl + +Conclusion +" +Well done! On to the last level! +" diff --git a/server/nng/NNG/Levels/Addition/Level_6.lean b/server/nng/NNG/Levels/Addition/Level_6.lean new file mode 100644 index 0000000..29658e1 --- /dev/null +++ b/server/nng/NNG/Levels/Addition/Level_6.lean @@ -0,0 +1,49 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.Levels.Addition.Level_5 + +Game "NNG" +World "Addition" +Level 6 +Title "add_right_comm" + +open MyNat + +namespace AdditionWorld + +Introduction +" +Lean sometimes writes `a + b + c`. What does it mean? The convention is +that if there are no brackets displayed in an addition formula, the brackets +are around the left most `+` (Lean's addition is \"left associative\"). +So the goal in this level is `(a + b) + c = (a + c) + b`. This isn't +quite `add_assoc` or `add_comm`, it's something you'll have to prove +by putting these two theorems together. + +If you hadn't picked up on this already, `rw [add_assoc]` will +change `(x + y) + z` to `x + (y + z)`, but to change it back +you will need `rw [← add_assoc]`. Get the left arrow by typing `\\l` +then the space bar (note that this is L for left, not a number 1). +Similarly, if `h : a = b` then `rw [h]` will change `a`'s to `b`'s +and `rw [← h]` will change `b`'s to `a`'s. + +Also, you can be (and will need to be, in this level) more precise +about where to rewrite theorems. `rw add_comm,` will just find the +first `? + ?` it sees and swap it around. You can target more specific +additions like this: `rw add_comm a` will swap around +additions of the form `a + ?`, and `rw add_comm a b,` will only +swap additions of the form `a + b`. +" + +Statement add_right_comm +"For all natural numbers $a, b$ and $c$, we have +$a + b + c = a + c + b$." + (a b c : ℕ) : a + b + c = a + c + b := by + rw [add_assoc] + rw [add_comm b c] + rw [←add_assoc] + rfl + +Conclusion +" +" diff --git a/server/nng/NNG/Levels/AdvAddition.lean b/server/nng/NNG/Levels/AdvAddition.lean new file mode 100644 index 0000000..cc2e95d --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition.lean @@ -0,0 +1,22 @@ +import NNG.Levels.AdvAddition.Level_1 +import NNG.Levels.AdvAddition.Level_2 +import NNG.Levels.AdvAddition.Level_3 +import NNG.Levels.AdvAddition.Level_4 +import NNG.Levels.AdvAddition.Level_5 +import NNG.Levels.AdvAddition.Level_6 +import NNG.Levels.AdvAddition.Level_7 +import NNG.Levels.AdvAddition.Level_8 +import NNG.Levels.AdvAddition.Level_9 +import NNG.Levels.AdvAddition.Level_10 +import NNG.Levels.AdvAddition.Level_11 +import NNG.Levels.AdvAddition.Level_12 +import NNG.Levels.AdvAddition.Level_13 + + +Game "NNG" +World "AdvAddition" +Title "Advanced Addition World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/AdvAddition/Level_1.lean b/server/nng/NNG/Levels/AdvAddition/Level_1.lean new file mode 100644 index 0000000..ded4dae --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_1.lean @@ -0,0 +1,30 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +theorem MyNat.succ_inj {a b : ℕ} : succ a = succ b → a = b := by simp only [succ.injEq, imp_self] + +theorem MyNat.zero_ne_succ (a : ℕ) : zero ≠ succ a := by simp only [ne_eq, not_false_iff] + +Statement succ_inj' +"" + {a b : ℕ} (hs : succ a = succ b) : a = b := by + exact succ_inj hs + +NewLemma MyNat.succ_inj MyNat.zero_ne_succ + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_10.lean b/server/nng/NNG/Levels/AdvAddition/Level_10.lean new file mode 100644 index 0000000..f9f01c7 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_10.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 10 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_11.lean b/server/nng/NNG/Levels/AdvAddition/Level_11.lean new file mode 100644 index 0000000..b4d244e --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_11.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 11 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_12.lean b/server/nng/NNG/Levels/AdvAddition/Level_12.lean new file mode 100644 index 0000000..ddc0e06 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_12.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 12 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_13.lean b/server/nng/NNG/Levels/AdvAddition/Level_13.lean new file mode 100644 index 0000000..13250ec --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_13.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 13 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_2.lean b/server/nng/NNG/Levels/AdvAddition/Level_2.lean new file mode 100644 index 0000000..1d22594 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_2.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_3.lean b/server/nng/NNG/Levels/AdvAddition/Level_3.lean new file mode 100644 index 0000000..09185a8 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_3.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_4.lean b/server/nng/NNG/Levels/AdvAddition/Level_4.lean new file mode 100644 index 0000000..6973471 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_4.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_5.lean b/server/nng/NNG/Levels/AdvAddition/Level_5.lean new file mode 100644 index 0000000..c3b8b6f --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_5.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_6.lean b/server/nng/NNG/Levels/AdvAddition/Level_6.lean new file mode 100644 index 0000000..72623d1 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_6.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_7.lean b/server/nng/NNG/Levels/AdvAddition/Level_7.lean new file mode 100644 index 0000000..1ef04a2 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_7.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_8.lean b/server/nng/NNG/Levels/AdvAddition/Level_8.lean new file mode 100644 index 0000000..09a2200 --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_8.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvAddition/Level_9.lean b/server/nng/NNG/Levels/AdvAddition/Level_9.lean new file mode 100644 index 0000000..6acbb8b --- /dev/null +++ b/server/nng/NNG/Levels/AdvAddition/Level_9.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvAddition" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvMultiplication.lean b/server/nng/NNG/Levels/AdvMultiplication.lean new file mode 100644 index 0000000..903e3d9 --- /dev/null +++ b/server/nng/NNG/Levels/AdvMultiplication.lean @@ -0,0 +1,13 @@ +import NNG.Levels.AdvMultiplication.Level_1 +import NNG.Levels.AdvMultiplication.Level_2 +import NNG.Levels.AdvMultiplication.Level_3 +import NNG.Levels.AdvMultiplication.Level_4 + + +Game "NNG" +World "AdvMultiplication" +Title "Advanced Multiplication World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/AdvMultiplication/Level_1.lean b/server/nng/NNG/Levels/AdvMultiplication/Level_1.lean new file mode 100644 index 0000000..bb1d6fc --- /dev/null +++ b/server/nng/NNG/Levels/AdvMultiplication/Level_1.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvMultiplication" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvMultiplication/Level_2.lean b/server/nng/NNG/Levels/AdvMultiplication/Level_2.lean new file mode 100644 index 0000000..f1afe1b --- /dev/null +++ b/server/nng/NNG/Levels/AdvMultiplication/Level_2.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvMultiplication" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvMultiplication/Level_3.lean b/server/nng/NNG/Levels/AdvMultiplication/Level_3.lean new file mode 100644 index 0000000..33413e4 --- /dev/null +++ b/server/nng/NNG/Levels/AdvMultiplication/Level_3.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvMultiplication" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvMultiplication/Level_4.lean b/server/nng/NNG/Levels/AdvMultiplication/Level_4.lean new file mode 100644 index 0000000..fa3a204 --- /dev/null +++ b/server/nng/NNG/Levels/AdvMultiplication/Level_4.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvMultiplication" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition.lean b/server/nng/NNG/Levels/AdvProposition.lean new file mode 100644 index 0000000..8d38a47 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition.lean @@ -0,0 +1,19 @@ +import NNG.Levels.AdvProposition.Level_1 +import NNG.Levels.AdvProposition.Level_2 +import NNG.Levels.AdvProposition.Level_3 +import NNG.Levels.AdvProposition.Level_4 +import NNG.Levels.AdvProposition.Level_5 +import NNG.Levels.AdvProposition.Level_6 +import NNG.Levels.AdvProposition.Level_7 +import NNG.Levels.AdvProposition.Level_8 +import NNG.Levels.AdvProposition.Level_9 +import NNG.Levels.AdvProposition.Level_10 + + +Game "NNG" +World "AdvProposition" +Title "Advanced Proposition World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/AdvProposition/Level_1.lean b/server/nng/NNG/Levels/AdvProposition/Level_1.lean new file mode 100644 index 0000000..10868a8 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_1.lean @@ -0,0 +1,28 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "AdvProposition" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) (p : P) (q : Q) : P ∧ Q := by + constructor + exact p + exact q + +NewTactic constructor + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_10.lean b/server/nng/NNG/Levels/AdvProposition/Level_10.lean new file mode 100644 index 0000000..1622db4 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_10.lean @@ -0,0 +1,36 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases + +Game "NNG" +World "AdvProposition" +Level 10 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) : (¬ Q → ¬ P) → (P → Q) := by + by_cases p : P + · by_cases q : Q + intro h p' -- cc + assumption + intro h p' + have g : ¬ P := h q + contradiction + · by_cases q : Q + intro h p + assumption + intro h p + contradiction + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_2.lean b/server/nng/NNG/Levels/AdvProposition/Level_2.lean new file mode 100644 index 0000000..526e47a --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_2.lean @@ -0,0 +1,33 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases + +Game "NNG" +World "AdvProposition" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +set_option tactic.hygienic false + +Statement and_symm +"" + (P Q : Prop) : P ∧ Q → Q ∧ P := by + intro h + rcases h with ⟨p, q⟩ + constructor + exact q + exact p + +NewTactic rcases + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_3.lean b/server/nng/NNG/Levels/AdvProposition/Level_3.lean new file mode 100644 index 0000000..76415ec --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_3.lean @@ -0,0 +1,31 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases + +Game "NNG" +World "AdvProposition" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement and_trans +"" + (P Q R : Prop) : P ∧ Q → Q ∧ R → P ∧ R := by + intro hpq + intro hqr + rcases hpq with ⟨p, q⟩ + rcases hqr with ⟨q', r⟩ + constructor + assumption + assumption + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_4.lean b/server/nng/NNG/Levels/AdvProposition/Level_4.lean new file mode 100644 index 0000000..023bd22 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_4.lean @@ -0,0 +1,31 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases + +Game "NNG" +World "AdvProposition" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement iff_trans +"" + (P Q R : Prop) : (P ↔ Q) → (Q ↔ R) → (P ↔ R) := by + intro hpq + intro hqr + rcases hpq with ⟨hpq, hqp⟩ + rcases hqr with ⟨hqr, hrq⟩ + constructor + exact fun x => hqr (hpq x) -- cc + exact fun x => hqp (hrq x) -- cc + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_5.lean b/server/nng/NNG/Levels/AdvProposition/Level_5.lean new file mode 100644 index 0000000..26224e6 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_5.lean @@ -0,0 +1,34 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases + +Game "NNG" +World "AdvProposition" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement iff_trans +"" + (P Q R : Prop) : (P ↔ Q) → (Q ↔ R) → (P ↔ R) := by + intro hpq hqr + constructor + intro p + apply hqr.1 + apply hpq.1 + assumption + intro r + apply hpq.2 + apply hqr.2 + assumption + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_6.lean b/server/nng/NNG/Levels/AdvProposition/Level_6.lean new file mode 100644 index 0000000..01ee698 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_6.lean @@ -0,0 +1,31 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases +import Mathlib.Tactic.LeftRight +--import Mathlib.Logic.Basic + +Game "NNG" +World "AdvProposition" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) : Q → (P ∨ Q) := by + intro q + right + assumption + +NewTactic left right + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_7.lean b/server/nng/NNG/Levels/AdvProposition/Level_7.lean new file mode 100644 index 0000000..abff8e3 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_7.lean @@ -0,0 +1,31 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases +import Mathlib.Tactic.LeftRight + +Game "NNG" +World "AdvProposition" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement or_symm +"" + (P Q : Prop) : P ∨ Q → Q ∨ P := by + intro h + rcases h with p | q + right + exact p + left + exact q + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_8.lean b/server/nng/NNG/Levels/AdvProposition/Level_8.lean new file mode 100644 index 0000000..fd235cc --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_8.lean @@ -0,0 +1,49 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases +import Mathlib.Tactic.LeftRight + +Game "NNG" +World "AdvProposition" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement and_or_distrib_left +"" + (P Q R : Prop) : P ∧ (Q ∨ R) ↔ (P ∧ Q) ∨ (P ∧ R) := by + constructor + intro h + rcases h with ⟨hp, hqr⟩ + rcases hqr with q | r + left + constructor + assumption + assumption + right + constructor + assumption + assumption + intro h + rcases h with hpq | hpr + rcases hpq with ⟨p, q⟩ + constructor + assumption + left + assumption + rcases hpr with ⟨hp, hr⟩ + constructor + assumption + right + assumption + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/AdvProposition/Level_9.lean b/server/nng/NNG/Levels/AdvProposition/Level_9.lean new file mode 100644 index 0000000..d04f314 --- /dev/null +++ b/server/nng/NNG/Levels/AdvProposition/Level_9.lean @@ -0,0 +1,36 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import Std.Tactic.RCases +import NNG.MyNat.Theorems.Proposition + + + +Game "NNG" +World "AdvProposition" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement contra +"" + (P Q : Prop) : (P ∧ ¬ P) → Q := by + intro h + rcases h with ⟨p, np ⟩ + contradiction + -- rw [not_iff_imp_false] at np + -- exfalso + -- apply np + -- exact p + +NewTactic exfalso contradiction + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function.lean b/server/nng/NNG/Levels/Function.lean new file mode 100644 index 0000000..5b7a403 --- /dev/null +++ b/server/nng/NNG/Levels/Function.lean @@ -0,0 +1,18 @@ +import NNG.Levels.Function.Level_1 +import NNG.Levels.Function.Level_2 +import NNG.Levels.Function.Level_3 +import NNG.Levels.Function.Level_4 +import NNG.Levels.Function.Level_5 +import NNG.Levels.Function.Level_6 +import NNG.Levels.Function.Level_7 +import NNG.Levels.Function.Level_8 +import NNG.Levels.Function.Level_9 + + +Game "NNG" +World "Function" +Title "Function World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Function/Level_1.lean b/server/nng/NNG/Levels/Function/Level_1.lean new file mode 100644 index 0000000..18aa81f --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_1.lean @@ -0,0 +1,27 @@ +import NNG.Metadata +import NNG.MyNat.Theorems.Addition +import NNG.MyNat.Multiplication + +Game "NNG" +World "Function" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"If $P$ is true, and $P\\implies Q$ is also true, then $Q$ is true." + (P Q : Prop) (p : P) (h : P → Q) : Q := by + exact h p + +NewTactic exact + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_2.lean b/server/nng/NNG/Levels/Function/Level_2.lean new file mode 100644 index 0000000..1e27341 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_2.lean @@ -0,0 +1,28 @@ +import NNG.Metadata +import NNG.MyNat.Theorems.Addition +import NNG.MyNat.Multiplication + +Game "NNG" +World "Function" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : ℕ → ℕ := by + intro n + exact 3 * n + 2 + +NewTactic intro + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_3.lean b/server/nng/NNG/Levels/Function/Level_3.lean new file mode 100644 index 0000000..1dc9c55 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_3.lean @@ -0,0 +1,31 @@ +import NNG.Metadata +import NNG.MyNat.Theorems.Addition +import NNG.MyNat.Multiplication + +Game "NNG" +World "Function" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R S T U: Type) (p : P) (h : P → Q) (i : Q → R) (j : Q → T) (k : S → T) (l : T → U) : + U := by + have q := h p + have t : T := j q + have u : U := l t + exact u + +NewTactic «have» + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_4.lean b/server/nng/NNG/Levels/Function/Level_4.lean new file mode 100644 index 0000000..ab2a23d --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_4.lean @@ -0,0 +1,37 @@ +import NNG.Metadata +import NNG.MyNat.Theorems.Addition +import NNG.MyNat.Multiplication + +Game "NNG" +World "Function" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R S T U: Type) +(p : P) +(h : P → Q) +(i : Q → R) +(j : Q → T) +(k : S → T) +(l : T → U) : U := +by + apply l + apply j + apply h + exact p + +NewTactic apply + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_5.lean b/server/nng/NNG/Levels/Function/Level_5.lean new file mode 100644 index 0000000..8f00824 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_5.lean @@ -0,0 +1,27 @@ +import NNG.Metadata +import NNG.MyNat.Theorems.Addition +import NNG.MyNat.Multiplication + +Game "NNG" +World "Function" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Type) : P → (Q → P) := by + intro p + intro q + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_6.lean b/server/nng/NNG/Levels/Function/Level_6.lean new file mode 100644 index 0000000..7754306 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_6.lean @@ -0,0 +1,30 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Function" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R : Type) : (P → (Q → R)) → ((P → Q) → (P → R)) := by + intro f + intro h + intro p + have j : Q → R := f p + apply j + apply h + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_7.lean b/server/nng/NNG/Levels/Function/Level_7.lean new file mode 100644 index 0000000..6cf284b --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_7.lean @@ -0,0 +1,29 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Function" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q F : Type) : (P → Q) → ((Q → F) → (P → F)) := by + intro f + intro h + intro p + apply h + apply f + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_8.lean b/server/nng/NNG/Levels/Function/Level_8.lean new file mode 100644 index 0000000..f715436 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_8.lean @@ -0,0 +1,27 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Function" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Type) : (P → Q) → ((Q → Empty) → (P → Empty)) := by + intros f h p + apply h + apply f + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Function/Level_9.lean b/server/nng/NNG/Levels/Function/Level_9.lean new file mode 100644 index 0000000..f612d41 --- /dev/null +++ b/server/nng/NNG/Levels/Function/Level_9.lean @@ -0,0 +1,36 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Function" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (A B C D E F G H I J K L : Type) + (f1 : A → B) (f2 : B → E) (f3 : E → D) (f4 : D → A) (f5 : E → F) + (f6 : F → C) (f7 : B → C) (f8 : F → G) (f9 : G → J) (f10 : I → J) + (f11 : J → I) (f12 : I → H) (f13 : E → H) (f14 : H → K) (f15 : I → L) : A → L := by + intro a + apply f15 + apply f11 + apply f9 + apply f8 + apply f5 + apply f2 + apply f1 + exact a + + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality.lean b/server/nng/NNG/Levels/Inequality.lean new file mode 100644 index 0000000..87a1766 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality.lean @@ -0,0 +1,25 @@ +import NNG.Levels.Inequality.Level_1 +import NNG.Levels.Inequality.Level_2 +import NNG.Levels.Inequality.Level_3 +import NNG.Levels.Inequality.Level_4 +import NNG.Levels.Inequality.Level_5 +import NNG.Levels.Inequality.Level_6 +import NNG.Levels.Inequality.Level_7 +import NNG.Levels.Inequality.Level_8 +import NNG.Levels.Inequality.Level_9 +import NNG.Levels.Inequality.Level_10 +import NNG.Levels.Inequality.Level_11 +import NNG.Levels.Inequality.Level_12 +import NNG.Levels.Inequality.Level_13 +import NNG.Levels.Inequality.Level_14 +import NNG.Levels.Inequality.Level_15 +import NNG.Levels.Inequality.Level_16 +import NNG.Levels.Inequality.Level_17 + +Game "NNG" +World "Inequality" +Title "Inequality World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Inequality/Level_1.lean b/server/nng/NNG/Levels/Inequality/Level_1.lean new file mode 100644 index 0000000..0995685 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_1.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_10.lean b/server/nng/NNG/Levels/Inequality/Level_10.lean new file mode 100644 index 0000000..a08569a --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_10.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 10 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_11.lean b/server/nng/NNG/Levels/Inequality/Level_11.lean new file mode 100644 index 0000000..b141e0f --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_11.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 11 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_12.lean b/server/nng/NNG/Levels/Inequality/Level_12.lean new file mode 100644 index 0000000..9ef7d0e --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_12.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 12 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_13.lean b/server/nng/NNG/Levels/Inequality/Level_13.lean new file mode 100644 index 0000000..5308b97 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_13.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 13 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_14.lean b/server/nng/NNG/Levels/Inequality/Level_14.lean new file mode 100644 index 0000000..4fd5211 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_14.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 14 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_15.lean b/server/nng/NNG/Levels/Inequality/Level_15.lean new file mode 100644 index 0000000..74ff4aa --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_15.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 15 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_16.lean b/server/nng/NNG/Levels/Inequality/Level_16.lean new file mode 100644 index 0000000..25d25fc --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_16.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 16 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_17.lean b/server/nng/NNG/Levels/Inequality/Level_17.lean new file mode 100644 index 0000000..f42a282 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_17.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 17 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_2.lean b/server/nng/NNG/Levels/Inequality/Level_2.lean new file mode 100644 index 0000000..597f6bd --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_2.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_3.lean b/server/nng/NNG/Levels/Inequality/Level_3.lean new file mode 100644 index 0000000..21d9865 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_3.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_4.lean b/server/nng/NNG/Levels/Inequality/Level_4.lean new file mode 100644 index 0000000..788af62 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_4.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_5.lean b/server/nng/NNG/Levels/Inequality/Level_5.lean new file mode 100644 index 0000000..3cf1b1b --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_5.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_6.lean b/server/nng/NNG/Levels/Inequality/Level_6.lean new file mode 100644 index 0000000..5b28efe --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_6.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_7.lean b/server/nng/NNG/Levels/Inequality/Level_7.lean new file mode 100644 index 0000000..bc22434 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_7.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_8.lean b/server/nng/NNG/Levels/Inequality/Level_8.lean new file mode 100644 index 0000000..8cc9b70 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_8.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Inequality/Level_9.lean b/server/nng/NNG/Levels/Inequality/Level_9.lean new file mode 100644 index 0000000..4c2afa4 --- /dev/null +++ b/server/nng/NNG/Levels/Inequality/Level_9.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Inequality" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication.lean b/server/nng/NNG/Levels/Multiplication.lean new file mode 100644 index 0000000..4ff6d8c --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication.lean @@ -0,0 +1,18 @@ +import NNG.Levels.Multiplication.Level_1 +import NNG.Levels.Multiplication.Level_2 +import NNG.Levels.Multiplication.Level_3 +import NNG.Levels.Multiplication.Level_4 +import NNG.Levels.Multiplication.Level_5 +import NNG.Levels.Multiplication.Level_6 +import NNG.Levels.Multiplication.Level_7 +import NNG.Levels.Multiplication.Level_8 +import NNG.Levels.Multiplication.Level_9 + + +Game "NNG" +World "Multiplication" +Title "Multiplication World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Multiplication/Level_1.lean b/server/nng/NNG/Levels/Multiplication/Level_1.lean new file mode 100644 index 0000000..c2ad14a --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_1.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_2.lean b/server/nng/NNG/Levels/Multiplication/Level_2.lean new file mode 100644 index 0000000..502e4f6 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_2.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_3.lean b/server/nng/NNG/Levels/Multiplication/Level_3.lean new file mode 100644 index 0000000..ca45877 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_3.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_4.lean b/server/nng/NNG/Levels/Multiplication/Level_4.lean new file mode 100644 index 0000000..e692704 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_4.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_5.lean b/server/nng/NNG/Levels/Multiplication/Level_5.lean new file mode 100644 index 0000000..01e06dc --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_5.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_6.lean b/server/nng/NNG/Levels/Multiplication/Level_6.lean new file mode 100644 index 0000000..4eeba03 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_6.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_7.lean b/server/nng/NNG/Levels/Multiplication/Level_7.lean new file mode 100644 index 0000000..746f3c9 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_7.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_8.lean b/server/nng/NNG/Levels/Multiplication/Level_8.lean new file mode 100644 index 0000000..369d554 --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_8.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Multiplication/Level_9.lean b/server/nng/NNG/Levels/Multiplication/Level_9.lean new file mode 100644 index 0000000..20fb8eb --- /dev/null +++ b/server/nng/NNG/Levels/Multiplication/Level_9.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Multiplication" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power.lean b/server/nng/NNG/Levels/Power.lean new file mode 100644 index 0000000..54910cb --- /dev/null +++ b/server/nng/NNG/Levels/Power.lean @@ -0,0 +1,16 @@ +import NNG.Levels.Power.Level_1 +import NNG.Levels.Power.Level_2 +import NNG.Levels.Power.Level_3 +import NNG.Levels.Power.Level_4 +import NNG.Levels.Power.Level_5 +import NNG.Levels.Power.Level_6 +import NNG.Levels.Power.Level_7 +import NNG.Levels.Power.Level_8 + +Game "NNG" +World "Power" +Title "Power World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Power/Level_1.lean b/server/nng/NNG/Levels/Power/Level_1.lean new file mode 100644 index 0000000..6a9192c --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_1.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_2.lean b/server/nng/NNG/Levels/Power/Level_2.lean new file mode 100644 index 0000000..fe6698a --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_2.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_3.lean b/server/nng/NNG/Levels/Power/Level_3.lean new file mode 100644 index 0000000..7cf3d38 --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_3.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_4.lean b/server/nng/NNG/Levels/Power/Level_4.lean new file mode 100644 index 0000000..635fd22 --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_4.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_5.lean b/server/nng/NNG/Levels/Power/Level_5.lean new file mode 100644 index 0000000..e9f6dc0 --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_5.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_6.lean b/server/nng/NNG/Levels/Power/Level_6.lean new file mode 100644 index 0000000..eaf97a0 --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_6.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_7.lean b/server/nng/NNG/Levels/Power/Level_7.lean new file mode 100644 index 0000000..f5b1949 --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_7.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Power/Level_8.lean b/server/nng/NNG/Levels/Power/Level_8.lean new file mode 100644 index 0000000..0240bfd --- /dev/null +++ b/server/nng/NNG/Levels/Power/Level_8.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Power" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + : true := by + trivial + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition.lean b/server/nng/NNG/Levels/Proposition.lean new file mode 100644 index 0000000..9dc768a --- /dev/null +++ b/server/nng/NNG/Levels/Proposition.lean @@ -0,0 +1,18 @@ +import NNG.Levels.Proposition.Level_1 +import NNG.Levels.Proposition.Level_2 +import NNG.Levels.Proposition.Level_3 +import NNG.Levels.Proposition.Level_4 +import NNG.Levels.Proposition.Level_5 +import NNG.Levels.Proposition.Level_6 +import NNG.Levels.Proposition.Level_7 +import NNG.Levels.Proposition.Level_8 +-- import NNG.Levels.Proposition.Level_9 -- `cc` is not ported + + +Game "NNG" +World "Proposition" +Title "Proposition World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Proposition/Level_1.lean b/server/nng/NNG/Levels/Proposition/Level_1.lean new file mode 100644 index 0000000..179f73a --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_1.lean @@ -0,0 +1,24 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 1 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) (p : P) (h : P → Q) : Q := by +exact h p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_2.lean b/server/nng/NNG/Levels/Proposition/Level_2.lean new file mode 100644 index 0000000..d4165df --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_2.lean @@ -0,0 +1,25 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 2 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + {P : Prop} : P → P := by + intro p + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_3.lean b/server/nng/NNG/Levels/Proposition/Level_3.lean new file mode 100644 index 0000000..707f571 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_3.lean @@ -0,0 +1,30 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 3 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R S T U: Prop) (p : P) (h : P → Q) (i : Q → R) + (j : Q → T) (k : S → T) (l : T → U) : U := by + have q := h p + have t := j q + have u := l t + exact u + +DisabledTactic apply + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_4.lean b/server/nng/NNG/Levels/Proposition/Level_4.lean new file mode 100644 index 0000000..e81b416 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_4.lean @@ -0,0 +1,30 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 4 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R S T U: Prop) (p : P) (h : P → Q) (i : Q → R) + (j : Q → T) (k : S → T) (l : T → U) : U := by + apply l + apply j + apply h + exact p + +DisabledTactic «have» + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_5.lean b/server/nng/NNG/Levels/Proposition/Level_5.lean new file mode 100644 index 0000000..30c6832 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_5.lean @@ -0,0 +1,26 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 5 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) : P → (Q → P) := by + intro p + intro q + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_6.lean b/server/nng/NNG/Levels/Proposition/Level_6.lean new file mode 100644 index 0000000..2d71058 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_6.lean @@ -0,0 +1,30 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 6 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R : Prop) : (P → (Q → R)) → ((P → Q) → (P → R)) := by + intro f + intro h + intro p + have j : Q → R := f p + apply j + apply h + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_7.lean b/server/nng/NNG/Levels/Proposition/Level_7.lean new file mode 100644 index 0000000..5caa3a3 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_7.lean @@ -0,0 +1,28 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Proposition" +Level 7 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q R : Prop) : (P → Q) → ((Q → R) → (P → R)) := by + intro hpq hqr + intro p + apply hqr + apply hpq + exact p + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_8.lean b/server/nng/NNG/Levels/Proposition/Level_8.lean new file mode 100644 index 0000000..566034c --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_8.lean @@ -0,0 +1,35 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.MyNat.Theorems.Proposition + + +Game "NNG" +World "Proposition" +Level 8 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (P Q : Prop) : (P → Q) → (¬ Q → ¬ P) := by + rw [not_iff_imp_false] + rw [not_iff_imp_false] + intro f + intro h + intro p + apply h + apply f + exact p + +NewLemma not_iff_imp_false + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Proposition/Level_9.lean b/server/nng/NNG/Levels/Proposition/Level_9.lean new file mode 100644 index 0000000..3f83050 --- /dev/null +++ b/server/nng/NNG/Levels/Proposition/Level_9.lean @@ -0,0 +1,29 @@ +import NNG.Metadata +import NNG.MyNat.Addition +import NNG.MyNat.Theorems.Proposition + +Game "NNG" +World "Proposition" +Level 9 +Title "" + +open MyNat + +Introduction +" + +" + +Statement +"" + (A B C D E F G H I J K L : Prop) + (f1 : A → B) (f2 : B → E) (f3 : E → D) (f4 : D → A) (f5 : E → F) + (f6 : F → C) (f7 : B → C) (f8 : F → G) (f9 : G → J) (f10 : I → J) + (f11 : J → I) (f12 : I → H) (f13 : E → H) (f14 : H → K) (f15 : I → L) : A → L := by + -- cc -- TODO: `cc` is not ported yet. + sorry + +Conclusion +" + +" diff --git a/server/nng/NNG/Levels/Tutorial.lean b/server/nng/NNG/Levels/Tutorial.lean new file mode 100644 index 0000000..5fcd9a3 --- /dev/null +++ b/server/nng/NNG/Levels/Tutorial.lean @@ -0,0 +1,12 @@ +import NNG.Levels.Tutorial.Level_1 +import NNG.Levels.Tutorial.Level_2 +import NNG.Levels.Tutorial.Level_3 +import NNG.Levels.Tutorial.Level_4 + +Game "NNG" +World "Tutorial" +Title "Tutorial World" + +Introduction +" +" \ No newline at end of file diff --git a/server/nng/NNG/Levels/Tutorial/Level_1.lean b/server/nng/NNG/Levels/Tutorial/Level_1.lean new file mode 100644 index 0000000..13a6d5b --- /dev/null +++ b/server/nng/NNG/Levels/Tutorial/Level_1.lean @@ -0,0 +1,42 @@ +import NNG.Metadata +import NNG.MyNat.Multiplication + +Game "NNG" +World "Tutorial" +Level 1 +Title "The rfl tactic" + +Introduction +" +Each level in this game involves proving a mathematical statement. In this first level +you have three natural numbers $x, y, z$ (listed under \"Objects\") and you want to prove +$x \\cdot y + z = x \\cdot y + z$ (displayed under \"Goal\"). + +You can modify the Goal using *Tactics* until you can close (i.e. prove) it. + +The first tactic is called `rfl`, which stands for \"reflexivity\", +a fancy way of saying that it will prove any goal of the form `A = A`. It doesn't matter how +complicated `A` is, all that matters is that the left hand side is exactly equal to the right hand +side (a computer scientist would say \"definitionally equal\"). I really mean \"press the same buttons +on your computer in the same order\" equal. For example, `x * y + z = x * y + z` can be proved by `rfl`, +but `x + y = y + x` cannot. +" + +Statement +"For all natural numbers $x, y$ and $z$, we have $xy + z = xy + z$." + (x y z : ℕ) : x * y + z = x * y + z := by + Hint "In order to use the tactic `rfl` you can enter it above and hit \"Execute\"." + rfl + +NewTactic rfl +NewDefinition MyNat + +Conclusion +" +Congratulations! You completed your first verified proof! + +If you want to be reminded about the `rfl` tactic, your inventory on the right contains useful +information about things you've learned. + +Now click on \"Next\" to continue the journey. +" diff --git a/server/nng/NNG/Levels/Tutorial/Level_2.lean b/server/nng/NNG/Levels/Tutorial/Level_2.lean new file mode 100644 index 0000000..a17243e --- /dev/null +++ b/server/nng/NNG/Levels/Tutorial/Level_2.lean @@ -0,0 +1,46 @@ +import NNG.Metadata +import NNG.MyNat.Multiplication + +Game "NNG" +World "Tutorial" +Level 2 +Title "the rewrite (rw) tactic" + +Introduction +" +In this level, you also get \"Assumptions\" about your objects. These are hypotheses of which +you assume (or know) that they are true. + +The `rewrite` tactic is the way to \"substitute in\" the value of a variable. +If you have a hypothesis of the form `A = B`, and your goal mentions +the left hand side `A` somewhere, +then the rewrite tactic will replace the `A` in your goal with a `B`. + +*(Note: For this game, `rw` is a shorthand for `rewrite`. Out in the real world, `rw` tries to call +`rfl` automatically afterwards.)* +" + +Statement +"If $x$ and $y$ are natural numbers, and $y = x + 7$, then $2y = 2(x + 7)$." + (x y : ℕ) (h : y = x + 7) : 2 * y = 2 * (x + 7) := by + Hint "You can use `rewrite [h]` to replace the `{y}` with `x + 7`. + Note that the assumption `h` is written + inside square brackets: `[h]`." + rw [h] + Hint "In this game not all hints are directly shown. If you need help finishing the proof, click + on \"More Help\" below!" + Hint (hidden := true) + "Now both sides are identical, so you can use `rfl` to close the goal." + rfl + +NewTactic rewrite rw + +Conclusion +" +If you want to see the entire proof you created, toggle \"Editor mode\" above. + +There you can also move your cursor around the proof to see the \"state\" of the proof at this point. + +Each tactic is written on a new line and Lean is sensitive to indentation (i.e. there must be no +spaces before any of the tactics) +" diff --git a/server/nng/NNG/Levels/Tutorial/Level_3.lean b/server/nng/NNG/Levels/Tutorial/Level_3.lean new file mode 100644 index 0000000..a65e434 --- /dev/null +++ b/server/nng/NNG/Levels/Tutorial/Level_3.lean @@ -0,0 +1,71 @@ +import NNG.Metadata +import NNG.MyNat.Definition + +Game "NNG" +World "Tutorial" +Level 3 +Title "Peano axioms" + +open MyNat + +Introduction +" +Now we start from the beginning, where we don't know about addition or multiplication on `ℕ`. + +All we get is the following data: + +* a term `(0 : ℕ)`, interpreted as the zero number. +* a function `succ : ℕ → ℕ`, with `succ n` interpreted as \"the number after $n$\". +* the principle of mathematical induction. + +These axioms are essentially the axioms isolated by Peano which uniquely characterise the natural +numbers (we also need recursion, but we can ignore it for now). +The first axiom says that $0$ is a natural number. +The second says that there is a $\\operatorname{succ}$ function which eats a number and spits out +the number after it, so $\\operatorname{succ}(0)=1$, $\\operatorname{succ}(1)=2$ and so on. + +Peano's last axiom is the principle of mathematical induction. This is a deeper fact. +It says that if we have infinitely many true/false statements $P(0)$, $P(1)$, $P(2)$ and so on, +and if $P(0)$ is true, and if for every natural number $d$ we know that $P(d)$ implies +$P(\\operatorname{succ}(d))$, then $P(n)$ must be true for every natural number $n$. +It's like saying that if you have a long line of dominoes, and if you knock the first +one down, and if you know that if a domino falls down then the one after it will fall +down too, then you can deduce that all the dominos will fall down. One can also think +of it as saying that every natural number can be built by starting at $0$ and then applying +$\\operatorname{succ}$ a finite number of times. + +Peano's insights were firstly that these axioms completely characterise the natural numbers, +and secondly that these axioms alone can be used to build a whole bunch of other structure +on the natural numbers, for example addition, multiplication and so on. + +This game is all about seeing how far these axioms of Peano can take us. + +Now let us practise the use of `rewrite` with this new function `succ`: +" + +Statement +"If $\\operatorname{succ}(a) = b$, then $\\operatorname{succ}(\\operatorname{succ}(a)) = \\operatorname{succ}(a)$." + (a b : ℕ) (h : (succ a) = b) : succ (succ a) = succ b := by + Hint "You can use `rewrite` and your assumption `{h}` to substitute `succ a` with `b`. + + Notes: + + 1) We do not need brackets for function application the way we would write + them in mathematics: `succ b` means $\\operatorname\{succ}(b)$. + 2) If you would want to substitute instead `b` with `succ a`, you can do that + writing a small `←` (`\\l`, i.e. backslash + small letter L + space) + before `h` like this: `rewrite [← h]`." + Branch + rewrite [← h] + Hint (hidden := true) "Now both sides are identical…" + rewrite [h] + Hint (hidden := true) "Now both sides are identical…" + rfl + +Conclusion +" +You may also be wondering why we keep writing `succ b` instead of `b + 1`. +This is because we haven't defined addition yet! +On the next level, the final level of Tutorial World, +we will introduce addition, and then we'll be ready to enter Addition World. +" diff --git a/server/nng/NNG/Levels/Tutorial/Level_4.lean b/server/nng/NNG/Levels/Tutorial/Level_4.lean new file mode 100644 index 0000000..742c5ac --- /dev/null +++ b/server/nng/NNG/Levels/Tutorial/Level_4.lean @@ -0,0 +1,68 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +Game "NNG" +World "Tutorial" +Level 4 +Title "addition" + +open MyNat + +Introduction +" +Peano defined addition $a + b$ by induction on $b$, or, more precisely, by *recursion* on $b$. +He first explained how to add $0$ to a number: this is the base case. + +* `add_zero (a : ℕ) : a + 0 = a` + +We will call this theorem `add_zero`. +More precisely, `add_zero` is the name of the *proof* of the +theorem. Note the name of this proof. Mathematicians sometimes call it +\"Lemma 2.1\" or \"Hypothesis P6\" or something. +But computer scientists call it `add_zero` because it tells you what the answer to +\"x add zero\" is. It's a much better name than \"Lemma 2.1\". +Even better, you can use the `rewrite` tactic +with `add_zero`. If you ever see `x + 0` in your goal, +`rewrite [add_zero]` should simplify it to `x`. This is +because `add_zero` is a proof that `x + 0 = x` +(more precisely, `add_zero x` is a proof that `x + 0 = x` but +Lean can figure out the `x` from the context). + +Now here's the inductive step. If you know how to add $d$ to $a$, then Peano +tells you how to add $\\operatorname{succ} (d)$ to $a$. It looks like this: + +- `add_succ (a d : ℕ) : a + (succ d) = succ (a + d)` + +What's going on here is that we assume `a + d` is already defined, and we define +`a + (succ d)` to be the number after it. +Note the name of this proof too: `add_succ` tells you how to add a successor +to something. +If you ever see `… + succ …` in your goal, you should be able to use +`rewrite [add_succ]`, to make progress. +" + +Statement +"For all natural numbers $a$, we have $a + \\operatorname{succ}(0) = a$." + (a : ℕ) : a + succ 0 = succ a := by + Hint "You find `{a} + succ …` in the goal, so you can use `rewrite` and `add_succ` + to make progress." + Hint (hidden := true) "Explicitely, type `rewrite [add_succ]`!" + rewrite [add_succ] + Hint "Now you see a term of the form `… + 0`, so you can use `add_zero`." + Hint (hidden := true) "Explicitely, type `rewrite [add_zero]`!" + rewrite [add_zero] + Hint (hidden := true) "Finally both sides are identical." + rfl + +NewLemma MyNat.add_succ MyNat.add_zero + +Conclusion +" +You have finished tutorial world! If you're happy, let's move onto Addition World, +and learn about proof by induction. + +## Inspection time + +If you want to examine the proof, toggle \"Editor mode\" and click somewhere +inside the proof to see the state at that point! +" diff --git a/server/nng/NNG/Metadata.lean b/server/nng/NNG/Metadata.lean new file mode 100644 index 0000000..faf9e98 --- /dev/null +++ b/server/nng/NNG/Metadata.lean @@ -0,0 +1,5 @@ +import GameServer.Commands +import NNG.Doc.Tactics +import NNG.Doc.Lemmas +import NNG.Doc.Definitions +import NNG.Modifications.Tactics diff --git a/server/nng/NNG/Modifications/Tactics.lean b/server/nng/NNG/Modifications/Tactics.lean new file mode 100644 index 0000000..4a488bd --- /dev/null +++ b/server/nng/NNG/Modifications/Tactics.lean @@ -0,0 +1,131 @@ +import Mathlib.Lean.Expr.Basic +import NNG.MyNat.Addition +import Lean.Elab.Tactic.Basic + +/-! +# Modified `rw` + +Modify `rw` to work like `rewrite`. + +This is mainly a copy of the implementation of `rewrite` in Lean core. +-/ + +namespace MyNat + +open Lean.Meta Lean.Elab.Tactic Lean.Parser.Tactic + +/-- +Modified `rw` tactic. For this game, `rw` works exactly like `rewrite`. +-/ +syntax (name := rewriteSeq) "rw" (config)? rwRuleSeq (location)? : tactic + +@[tactic MyNat.rewriteSeq] def evalRewriteSeq : Tactic := fun stx => do + let cfg ← elabRewriteConfig stx[1] + let loc := expandOptLocation stx[3] + withRWRulesSeq stx[0] stx[2] fun symm term => do + withLocation loc + (rewriteLocalDecl term symm · cfg) + (rewriteTarget term symm cfg) + (throwTacticEx `rewrite · "did not find instance of the pattern in the current goal") + +/-! +# Modified `induction` tactic + +Modify `induction` tactic to always show `(0 : MyNat)` instead of `MyNat.zero` and +to support the lean3-style `while` keyword. + +This is mainly copied and modified from the mathlib-tactic `induction'`. +-/ + +def rec' {P : ℕ → Prop} (zero : P 0) + (succ : (n : ℕ) → (n_ih : P n) → P (succ n)) (t : ℕ) : P t := by + induction t with + | zero => assumption + | succ n => + apply succ + assumption + +end MyNat + +namespace Lean.Parser.Tactic +open Meta Elab Elab.Tactic + +open private getAltNumFields in evalCases ElimApp.evalAlts.go in +def ElimApp.evalNames (elimInfo : ElimInfo) (alts : Array ElimApp.Alt) (withArg : Syntax) + (numEqs := 0) (numGeneralized := 0) (toClear : Array FVarId := #[]) : + TermElabM (Array MVarId) := do + let mut names : List Syntax := withArg[1].getArgs |>.toList + let mut subgoals := #[] + for { name := altName, mvarId := g, .. } in alts do + let numFields ← getAltNumFields elimInfo altName + let (altVarNames, names') := names.splitAtD numFields (Unhygienic.run `(_)) + names := names' + let (fvars, g) ← g.introN numFields <| altVarNames.map (getNameOfIdent' ·[0]) + let some (g, subst) ← Cases.unifyEqs? numEqs g {} | pure () + let (_, g) ← g.introNP numGeneralized + let g ← liftM $ toClear.foldlM (·.tryClear) g + for fvar in fvars, stx in altVarNames do + g.withContext <| (subst.apply <| .fvar fvar).addLocalVarInfoForBinderIdent ⟨stx⟩ + subgoals := subgoals.push g + pure subgoals + +open private getElimNameInfo generalizeTargets generalizeVars in evalInduction in + +/-- +Modified `induction` tactic for this game. + +Usage: `induction n with d hd`. + +*(The actual `induction` tactic has a more complex `with`-argument that works differently)* +-/ +elab (name := _root_.MyNat.induction) "induction " tgts:(casesTarget,+) + withArg:((" with " (colGt binderIdent)+)?) + : tactic => do + let targets ← elabCasesTargets tgts.1.getSepArgs + let g :: gs ← getUnsolvedGoals | throwNoGoalsToBeSolved + g.withContext do + let elimInfo ← getElimInfo `MyNat.rec' + let targets ← addImplicitTargets elimInfo targets + evalInduction.checkTargets targets + let targetFVarIds := targets.map (·.fvarId!) + g.withContext do + let forbidden ← mkGeneralizationForbiddenSet targets + let mut s ← getFVarSetToGeneralize targets forbidden + let (fvarIds, g) ← g.revert (← sortFVarIds s.toArray) + let result ← withRef tgts <| ElimApp.mkElimApp elimInfo targets (← g.getTag) + let elimArgs := result.elimApp.getAppArgs + ElimApp.setMotiveArg g elimArgs[elimInfo.motivePos]!.mvarId! targetFVarIds + g.assign result.elimApp + let subgoals ← ElimApp.evalNames elimInfo result.alts withArg + (numGeneralized := fvarIds.size) (toClear := targetFVarIds) + setGoals <| (subgoals ++ result.others).toList ++ gs + +end Lean.Parser.Tactic + + +/-! # `rfl` tactic + +Added `withReducible` to prevent `rfl` proving stuff like `n + 0 = n`. +-/ + +namespace MyNat + +open Lean Meta Elab Tactic + +-- @[match_pattern] def MyNat.rfl {α : Sort u} {a : α} : Eq a a := Eq.refl a + +/-- Modified `rfl` tactic. + +`rfl` closes goals of the form `A = A`. + +Note that teh version for this game is somewhat weaker than the real one. -/ +syntax (name := rfl) "rfl" : tactic + +@[tactic MyNat.rfl] def evalRfl : Tactic := fun _ => + liftMetaTactic fun mvarId => do withReducible <| mvarId.refl; pure [] + +-- @[tactic MyNat.rfl] def evalRfl : Tactic := fun _ => +-- liftMetaTactic fun mvarId => do mvarId.refl; pure [] +-- (with_reducible rfl) + +end MyNat diff --git a/server/nng/NNG/MyNat/Addition.lean b/server/nng/NNG/MyNat/Addition.lean new file mode 100644 index 0000000..9f482f4 --- /dev/null +++ b/server/nng/NNG/MyNat/Addition.lean @@ -0,0 +1,23 @@ +import NNG.MyNat.Definition + +namespace MyNat + +open MyNat + +def add : MyNat → MyNat → MyNat + | a, 0 => a + | a, MyNat.succ b => MyNat.succ (MyNat.add a b) + +instance : Add MyNat where + add := MyNat.add + +/-- +This theorem proves that if you add zero to a MyNat you get back the same number. +-/ + +theorem add_zero (a : MyNat) : a + 0 = a := by rfl + +/-- +This theorem proves that (a + (d + 1)) = ((a + d) + 1) for a,d in MyNat. +-/ +theorem add_succ (a d : MyNat) : a + (succ d) = succ (a + d) := by rfl diff --git a/server/nng/NNG/MyNat/Definition.lean b/server/nng/NNG/MyNat/Definition.lean new file mode 100644 index 0000000..f567b27 --- /dev/null +++ b/server/nng/NNG/MyNat/Definition.lean @@ -0,0 +1,37 @@ +--import Mathlib.Tactic.Basic +--import Mathlib.Tactic.Cases + +/-- Our copy of the natural numbers called `MyNat`. -/ +inductive MyNat where +| zero : MyNat +| succ : MyNat → MyNat +deriving BEq, DecidableEq, Inhabited + +@[inherit_doc] +notation "ℕ" => MyNat +-- Note: as long as we do not import `Mathlib.Init.Data.Nat.Notation` this is fine. + +namespace MyNat + +instance : Inhabited MyNat where + default := MyNat.zero + +def myNatFromNat (x : Nat) : MyNat := + match x with + | Nat.zero => MyNat.zero + | Nat.succ b => MyNat.succ (myNatFromNat b) + +def natFromMyNat (x : MyNat) : Nat := + match x with + | MyNat.zero => Nat.zero + | MyNat.succ b => Nat.succ (natFromMyNat b) + +instance ofNat {n : Nat} : OfNat MyNat n where + ofNat := myNatFromNat n + +instance : ToString MyNat where + toString p := toString (natFromMyNat p) + +theorem zero_eq_0 : MyNat.zero = 0 := rfl + +def one : MyNat := MyNat.succ 0 diff --git a/server/nng/NNG/MyNat/Inequality.lean b/server/nng/NNG/MyNat/Inequality.lean new file mode 100644 index 0000000..1fb0956 --- /dev/null +++ b/server/nng/NNG/MyNat/Inequality.lean @@ -0,0 +1,28 @@ +import NNG.MyNat.Multiplication + +-- this is one of *three* routes to +-- canonically_ordered_comm_semiring + +namespace MyNat + +def le (a b : MyNat) := ∃ (c : MyNat), b = a + c + +-- Another choice is to define it recursively: +-- | le 0 _ +-- | le (succ a) (succ b) = le ab + +-- notation +instance : LE MyNat := ⟨MyNat.le⟩ + +theorem le_def' : MyNat.le = (.≤.) := rfl + +theorem le_iff_exists_add (a b : MyNat) : a ≤ b ↔ ∃ (c : MyNat), b = a + c := Iff.rfl + +def lt_myNat (a b : MyNat) := a ≤ b ∧ ¬ (b ≤ a) + +instance : LT MyNat := ⟨lt_myNat⟩ + +theorem lt : ∀ (a b : MyNat), a < b ↔ a ≤ b ∧ ¬b ≤ a := fun _ _ => Iff.rfl + + +end MyNat \ No newline at end of file diff --git a/server/nng/NNG/MyNat/Multiplication.lean b/server/nng/NNG/MyNat/Multiplication.lean new file mode 100644 index 0000000..53dd6b3 --- /dev/null +++ b/server/nng/NNG/MyNat/Multiplication.lean @@ -0,0 +1,17 @@ +import NNG.MyNat.Addition + +namespace MyNat + +open MyNat + +def mul : MyNat → MyNat → MyNat + | _, 0 => 0 + | a, b + 1 => a + (MyNat.mul a b) + +instance : Mul MyNat where + mul := MyNat.mul + +axiom mul_zero (a : MyNat) : a * 0 = 0 + +axiom mul_succ (a b : MyNat) : a * (succ b) = a * b + a + diff --git a/server/nng/NNG/MyNat/Power.lean b/server/nng/NNG/MyNat/Power.lean new file mode 100644 index 0000000..a1a0a01 --- /dev/null +++ b/server/nng/NNG/MyNat/Power.lean @@ -0,0 +1,21 @@ +import NNG.MyNat.Definition +namespace MyNat +open MyNat + +def pow : MyNat → MyNat → MyNat +| _, zero => one +| m, (succ n) => pow m n * m + +instance : Pow MyNat MyNat where + pow := pow + +-- notation a ^ b := pow a b + +example : (1 : MyNat) ^ (1 : MyNat) = 1 := rfl + +lemma pow_zero (m : MyNat) : m ^ (0 : MyNat) = 1 := rfl + +lemma pow_succ (m n : MyNat) : m ^ (succ n) = m ^ n * m := rfl + +end MyNat + diff --git a/server/nng/NNG/MyNat/Theorems/Addition.lean b/server/nng/NNG/MyNat/Theorems/Addition.lean new file mode 100644 index 0000000..0d04f8a --- /dev/null +++ b/server/nng/NNG/MyNat/Theorems/Addition.lean @@ -0,0 +1,46 @@ +import NNG.Metadata +import NNG.MyNat.Addition + +open MyNat + +theorem MyNat.zero_add (n : ℕ) : 0 + n = n := by + induction n with n hn + · rw [add_zero] + rfl + · rw [add_succ] + rw [hn] + rfl + +theorem MyNat.add_assoc (a b c : ℕ) : (a + b) + c = a + (b + c) := by + induction c with c hc + · rw [add_zero] + rw [add_zero] + rfl + · rw [add_succ] + rw [add_succ] + rw [add_succ] + rw [hc] + rfl + +theorem MyNat.succ_add (a b : ℕ) : succ a + b = succ (a + b) := by + induction b with d hd + · rw [add_zero] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [add_succ] + rfl + +theorem MyNat.add_comm (a b : ℕ) : a + b = b + a := by + induction b with d hd + · rw [zero_add] + rw [add_zero] + rfl + · rw [add_succ] + rw [hd] + rw [succ_add] + rfl + +theorem MyNat.one_eq_succ_zero : (1 : ℕ) = succ 0 := by + simp only diff --git a/server/nng/NNG/MyNat/Theorems/Proposition.lean b/server/nng/NNG/MyNat/Theorems/Proposition.lean new file mode 100644 index 0000000..9901853 --- /dev/null +++ b/server/nng/NNG/MyNat/Theorems/Proposition.lean @@ -0,0 +1 @@ +theorem not_iff_imp_false (P : Prop) : ¬ P ↔ P → false := by simp only diff --git a/server/nng/build/ir/NNG.c b/server/nng/build/ir/NNG.c new file mode 100644 index 0000000..1af17f6 --- /dev/null +++ b/server/nng/build/ir/NNG.c @@ -0,0 +1,73 @@ +// Lean compiler output +// Module: NNG +// Imports: Init GameServer.Commands NNG.Levels.Tutorial NNG.Levels.Addition NNG.Levels.Multiplication NNG.Levels.Power NNG.Levels.Function NNG.Levels.Proposition NNG.Levels.AdvProposition NNG.Levels.AdvAddition NNG.Levels.AdvMultiplication NNG.Levels.Inequality +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_GameServer_Commands(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Tutorial(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvMultiplication(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_GameServer_Commands(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Tutorial(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvMultiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG.c.trace b/server/nng/build/ir/NNG.c.trace new file mode 100644 index 0000000..813ce6e --- /dev/null +++ b/server/nng/build/ir/NNG.c.trace @@ -0,0 +1 @@ +7356427851528760174 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Doc/Definitions.c b/server/nng/build/ir/NNG/Doc/Definitions.c new file mode 100644 index 0000000..15f9cb0 --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Definitions.c @@ -0,0 +1,33 @@ +// Lean compiler output +// Module: NNG.Doc.Definitions +// Imports: Init GameServer.Commands +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_GameServer_Commands(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Doc_Definitions(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_GameServer_Commands(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Doc/Definitions.c.trace b/server/nng/build/ir/NNG/Doc/Definitions.c.trace new file mode 100644 index 0000000..a4001fc --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Definitions.c.trace @@ -0,0 +1 @@ +2922655963706979749 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Doc/Lemmas.c b/server/nng/build/ir/NNG/Doc/Lemmas.c new file mode 100644 index 0000000..0e18b5c --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Lemmas.c @@ -0,0 +1,33 @@ +// Lean compiler output +// Module: NNG.Doc.Lemmas +// Imports: Init GameServer.Commands +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_GameServer_Commands(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Doc_Lemmas(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_GameServer_Commands(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Doc/Lemmas.c.trace b/server/nng/build/ir/NNG/Doc/Lemmas.c.trace new file mode 100644 index 0000000..a348b20 --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Lemmas.c.trace @@ -0,0 +1 @@ +16771103639053061509 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Doc/Tactics.c b/server/nng/build/ir/NNG/Doc/Tactics.c new file mode 100644 index 0000000..896dd48 --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Tactics.c @@ -0,0 +1,33 @@ +// Lean compiler output +// Module: NNG.Doc.Tactics +// Imports: Init GameServer.Commands +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_GameServer_Commands(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Doc_Tactics(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_GameServer_Commands(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Doc/Tactics.c.trace b/server/nng/build/ir/NNG/Doc/Tactics.c.trace new file mode 100644 index 0000000..5a55535 --- /dev/null +++ b/server/nng/build/ir/NNG/Doc/Tactics.c.trace @@ -0,0 +1 @@ +5348243054589539109 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition.c b/server/nng/build/ir/NNG/Levels/Addition.c new file mode 100644 index 0000000..64c5101 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition.c @@ -0,0 +1,53 @@ +// Lean compiler output +// Module: NNG.Levels.Addition +// Imports: Init NNG.Levels.Addition.Level_1 NNG.Levels.Addition.Level_2 NNG.Levels.Addition.Level_3 NNG.Levels.Addition.Level_4 NNG.Levels.Addition.Level_5 NNG.Levels.Addition.Level_6 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__6(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition.c.trace b/server/nng/build/ir/NNG/Levels/Addition.c.trace new file mode 100644 index 0000000..97256e5 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition.c.trace @@ -0,0 +1 @@ +2084978910118405033 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_1.c b/server/nng/build/ir/NNG/Levels/Addition/Level_1.c new file mode 100644 index 0000000..4a48f7a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_1.c.trace new file mode 100644 index 0000000..09a9b3a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_1.c.trace @@ -0,0 +1 @@ +5269099431713252405 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_2.c b/server/nng/build/ir/NNG/Levels/Addition/Level_2.c new file mode 100644 index 0000000..86ebe99 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_2.c.trace new file mode 100644 index 0000000..14654bc --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_2.c.trace @@ -0,0 +1 @@ +17690234639472501785 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_3.c b/server/nng/build/ir/NNG/Levels/Addition/Level_3.c new file mode 100644 index 0000000..857252d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_3.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition NNG.Levels.Addition.Level_2 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__2(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_3.c.trace new file mode 100644 index 0000000..7d2c4df --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_3.c.trace @@ -0,0 +1 @@ +18302928042269315295 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_4.c b/server/nng/build/ir/NNG/Levels/Addition/Level_4.c new file mode 100644 index 0000000..7ec61f1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_4.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition NNG.Levels.Addition.Level_3 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__3(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_4.c.trace new file mode 100644 index 0000000..72e6acf --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_4.c.trace @@ -0,0 +1 @@ +12154535057277385306 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_5.c b/server/nng/build/ir/NNG/Levels/Addition/Level_5.c new file mode 100644 index 0000000..48b3da7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_5.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition NNG.Levels.Addition.Level_4 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__4(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_5.c.trace new file mode 100644 index 0000000..b660c1d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_5.c.trace @@ -0,0 +1 @@ +9679823460697032654 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_6.c b/server/nng/build/ir/NNG/Levels/Addition/Level_6.c new file mode 100644 index 0000000..9ae92fa --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_6.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Addition.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition NNG.Levels.Addition.Level_5 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Addition_Level__5(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Addition_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Addition_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Addition/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Addition/Level_6.c.trace new file mode 100644 index 0000000..13460c6 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Addition/Level_6.c.trace @@ -0,0 +1 @@ +17709657049698654137 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition.c b/server/nng/build/ir/NNG/Levels/AdvAddition.c new file mode 100644 index 0000000..7fb0302 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition.c @@ -0,0 +1,81 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition +// Imports: Init NNG.Levels.AdvAddition.Level_1 NNG.Levels.AdvAddition.Level_2 NNG.Levels.AdvAddition.Level_3 NNG.Levels.AdvAddition.Level_4 NNG.Levels.AdvAddition.Level_5 NNG.Levels.AdvAddition.Level_6 NNG.Levels.AdvAddition.Level_7 NNG.Levels.AdvAddition.Level_8 NNG.Levels.AdvAddition.Level_9 NNG.Levels.AdvAddition.Level_10 NNG.Levels.AdvAddition.Level_11 NNG.Levels.AdvAddition.Level_12 NNG.Levels.AdvAddition.Level_13 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__8(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__9(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__10(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__11(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__12(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvAddition_Level__13(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__9(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__10(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__11(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__12(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvAddition_Level__13(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition.c.trace new file mode 100644 index 0000000..9116234 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition.c.trace @@ -0,0 +1 @@ +7852774950450280612 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c new file mode 100644 index 0000000..28751bf --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c.trace new file mode 100644 index 0000000..d0094f7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_1.c.trace @@ -0,0 +1 @@ +9336372057508599589 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c new file mode 100644 index 0000000..067a4c0 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_10 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__10(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c.trace new file mode 100644 index 0000000..ed3ffc8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_10.c.trace @@ -0,0 +1 @@ +4008453200266032081 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c new file mode 100644 index 0000000..79c427c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_11 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__11(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c.trace new file mode 100644 index 0000000..5b253cc --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_11.c.trace @@ -0,0 +1 @@ +10015610238961501552 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c new file mode 100644 index 0000000..aa7eb84 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_12 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__12(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c.trace new file mode 100644 index 0000000..15d3040 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_12.c.trace @@ -0,0 +1 @@ +5389173862524826914 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c new file mode 100644 index 0000000..a398c07 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_13 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__13(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c.trace new file mode 100644 index 0000000..3535774 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_13.c.trace @@ -0,0 +1 @@ +185528048873600791 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c new file mode 100644 index 0000000..e92c5f0 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c.trace new file mode 100644 index 0000000..dfa5b14 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_2.c.trace @@ -0,0 +1 @@ +3507750203879559481 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c new file mode 100644 index 0000000..40d76ae --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c.trace new file mode 100644 index 0000000..410d78c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_3.c.trace @@ -0,0 +1 @@ +18314890376638277065 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c new file mode 100644 index 0000000..e87ab4f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c.trace new file mode 100644 index 0000000..16e6312 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_4.c.trace @@ -0,0 +1 @@ +2092365143561121648 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c new file mode 100644 index 0000000..87a21e8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c.trace new file mode 100644 index 0000000..ff557f6 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_5.c.trace @@ -0,0 +1 @@ +17123810049702200014 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c new file mode 100644 index 0000000..aa85e28 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c.trace new file mode 100644 index 0000000..b56da14 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_6.c.trace @@ -0,0 +1 @@ +9314509491732931710 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c new file mode 100644 index 0000000..e357d7d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c.trace new file mode 100644 index 0000000..2d90327 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_7.c.trace @@ -0,0 +1 @@ +13172030794097753806 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c new file mode 100644 index 0000000..8e82ba2 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c.trace new file mode 100644 index 0000000..c4f1af7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_8.c.trace @@ -0,0 +1 @@ +10314181165617171139 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c new file mode 100644 index 0000000..9f357c3 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvAddition.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvAddition_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c.trace new file mode 100644 index 0000000..e3e3b96 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvAddition/Level_9.c.trace @@ -0,0 +1 @@ +8205318715931175597 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication.c b/server/nng/build/ir/NNG/Levels/AdvMultiplication.c new file mode 100644 index 0000000..fd5d855 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.AdvMultiplication +// Imports: Init NNG.Levels.AdvMultiplication.Level_1 NNG.Levels.AdvMultiplication.Level_2 NNG.Levels.AdvMultiplication.Level_3 NNG.Levels.AdvMultiplication.Level_4 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvMultiplication_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvMultiplication_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvMultiplication_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvMultiplication_Level__4(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvMultiplication(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvMultiplication_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvMultiplication_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvMultiplication_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvMultiplication_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication.c.trace b/server/nng/build/ir/NNG/Levels/AdvMultiplication.c.trace new file mode 100644 index 0000000..c00fc7d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication.c.trace @@ -0,0 +1 @@ +5627580921265871323 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c new file mode 100644 index 0000000..a93a197 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvMultiplication.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvMultiplication_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c.trace new file mode 100644 index 0000000..fcd4fe6 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_1.c.trace @@ -0,0 +1 @@ +5496292641504121726 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c new file mode 100644 index 0000000..ecd4bc8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvMultiplication.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvMultiplication_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c.trace new file mode 100644 index 0000000..b982607 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_2.c.trace @@ -0,0 +1 @@ +3065456568864785697 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c new file mode 100644 index 0000000..5f8240e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvMultiplication.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvMultiplication_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c.trace new file mode 100644 index 0000000..63f9ad3 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_3.c.trace @@ -0,0 +1 @@ +11074674160667156308 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c new file mode 100644 index 0000000..0de9924 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvMultiplication.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvMultiplication_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c.trace new file mode 100644 index 0000000..428ebc8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvMultiplication/Level_4.c.trace @@ -0,0 +1 @@ +5171635906789131558 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition.c b/server/nng/build/ir/NNG/Levels/AdvProposition.c new file mode 100644 index 0000000..421a740 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition.c @@ -0,0 +1,69 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition +// Imports: Init NNG.Levels.AdvProposition.Level_1 NNG.Levels.AdvProposition.Level_2 NNG.Levels.AdvProposition.Level_3 NNG.Levels.AdvProposition.Level_4 NNG.Levels.AdvProposition.Level_5 NNG.Levels.AdvProposition.Level_6 NNG.Levels.AdvProposition.Level_7 NNG.Levels.AdvProposition.Level_8 NNG.Levels.AdvProposition.Level_9 NNG.Levels.AdvProposition.Level_10 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__8(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__9(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_AdvProposition_Level__10(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__9(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_AdvProposition_Level__10(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition.c.trace new file mode 100644 index 0000000..4e9a102 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition.c.trace @@ -0,0 +1 @@ +9478676650839776721 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c new file mode 100644 index 0000000..b33ea5a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c.trace new file mode 100644 index 0000000..1fa48a1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_1.c.trace @@ -0,0 +1 @@ +13140666477521992594 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c new file mode 100644 index 0000000..8083a4c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_10 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__10(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c.trace new file mode 100644 index 0000000..790c7bd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_10.c.trace @@ -0,0 +1 @@ +18203712100298108367 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c new file mode 100644 index 0000000..306eabe --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c.trace new file mode 100644 index 0000000..f2787fb --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_2.c.trace @@ -0,0 +1 @@ +10022829939796104452 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c new file mode 100644 index 0000000..6b62118 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c.trace new file mode 100644 index 0000000..9e0f004 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_3.c.trace @@ -0,0 +1 @@ +1967301918816512059 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c new file mode 100644 index 0000000..f7ecc78 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c.trace new file mode 100644 index 0000000..c2fe35c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_4.c.trace @@ -0,0 +1 @@ +16129653996493781623 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c new file mode 100644 index 0000000..4b69e18 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c.trace new file mode 100644 index 0000000..30bf614 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_5.c.trace @@ -0,0 +1 @@ +16436512257645906503 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c new file mode 100644 index 0000000..51c2aca --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases Mathlib.Tactic.LeftRight +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +lean_object* initialize_Mathlib_Tactic_LeftRight(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Mathlib_Tactic_LeftRight(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c.trace new file mode 100644 index 0000000..bf05509 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_6.c.trace @@ -0,0 +1 @@ +14208111587323885963 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c new file mode 100644 index 0000000..23b5137 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases Mathlib.Tactic.LeftRight +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +lean_object* initialize_Mathlib_Tactic_LeftRight(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Mathlib_Tactic_LeftRight(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c.trace new file mode 100644 index 0000000..807ca0c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_7.c.trace @@ -0,0 +1 @@ +8730344058151551457 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c new file mode 100644 index 0000000..a24c8f9 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases Mathlib.Tactic.LeftRight +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +lean_object* initialize_Mathlib_Tactic_LeftRight(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Mathlib_Tactic_LeftRight(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c.trace new file mode 100644 index 0000000..074308d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_8.c.trace @@ -0,0 +1 @@ +14257091850430971994 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c new file mode 100644 index 0000000..9b02e9b --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.AdvProposition.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition Std.Tactic.RCases NNG.MyNat.Theorems.Proposition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Std_Tactic_RCases(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Proposition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_AdvProposition_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Std_Tactic_RCases(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Proposition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c.trace new file mode 100644 index 0000000..34aee37 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/AdvProposition/Level_9.c.trace @@ -0,0 +1 @@ +14967413771991349992 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function.c b/server/nng/build/ir/NNG/Levels/Function.c new file mode 100644 index 0000000..1096fb8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function.c @@ -0,0 +1,65 @@ +// Lean compiler output +// Module: NNG.Levels.Function +// Imports: Init NNG.Levels.Function.Level_1 NNG.Levels.Function.Level_2 NNG.Levels.Function.Level_3 NNG.Levels.Function.Level_4 NNG.Levels.Function.Level_5 NNG.Levels.Function.Level_6 NNG.Levels.Function.Level_7 NNG.Levels.Function.Level_8 NNG.Levels.Function.Level_9 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__8(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Function_Level__9(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Function_Level__9(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function.c.trace b/server/nng/build/ir/NNG/Levels/Function.c.trace new file mode 100644 index 0000000..a011cea --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function.c.trace @@ -0,0 +1 @@ +4955068752717367929 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_1.c b/server/nng/build/ir/NNG/Levels/Function/Level_1.c new file mode 100644 index 0000000..60c18c8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_1.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Theorems.Addition NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_1.c.trace new file mode 100644 index 0000000..3648ee3 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_1.c.trace @@ -0,0 +1 @@ +11635906400192042058 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_2.c b/server/nng/build/ir/NNG/Levels/Function/Level_2.c new file mode 100644 index 0000000..b5fd02a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_2.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Theorems.Addition NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_2.c.trace new file mode 100644 index 0000000..2f74304 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_2.c.trace @@ -0,0 +1 @@ +5739902419023245944 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_3.c b/server/nng/build/ir/NNG/Levels/Function/Level_3.c new file mode 100644 index 0000000..5e5c417 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_3.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Theorems.Addition NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_3.c.trace new file mode 100644 index 0000000..3765006 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_3.c.trace @@ -0,0 +1 @@ +13295869598671621401 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_4.c b/server/nng/build/ir/NNG/Levels/Function/Level_4.c new file mode 100644 index 0000000..c9563c7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_4.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Theorems.Addition NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_4.c.trace new file mode 100644 index 0000000..f73245d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_4.c.trace @@ -0,0 +1 @@ +2060723493075565450 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_5.c b/server/nng/build/ir/NNG/Levels/Function/Level_5.c new file mode 100644 index 0000000..73ca291 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_5.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Theorems.Addition NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_5.c.trace new file mode 100644 index 0000000..348e271 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_5.c.trace @@ -0,0 +1 @@ +33560334747064612 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_6.c b/server/nng/build/ir/NNG/Levels/Function/Level_6.c new file mode 100644 index 0000000..8cfe33e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_6.c.trace new file mode 100644 index 0000000..4fcc927 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_6.c.trace @@ -0,0 +1 @@ +11236535691868165392 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_7.c b/server/nng/build/ir/NNG/Levels/Function/Level_7.c new file mode 100644 index 0000000..fa6a455 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_7.c.trace new file mode 100644 index 0000000..81404ca --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_7.c.trace @@ -0,0 +1 @@ +13833688845280623014 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_8.c b/server/nng/build/ir/NNG/Levels/Function/Level_8.c new file mode 100644 index 0000000..a7ee1bb --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_8.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_8.c.trace new file mode 100644 index 0000000..247b254 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_8.c.trace @@ -0,0 +1 @@ +3072509448285891874 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_9.c b/server/nng/build/ir/NNG/Levels/Function/Level_9.c new file mode 100644 index 0000000..4a3f731 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_9.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Function.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Function_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Function/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/Function/Level_9.c.trace new file mode 100644 index 0000000..a7ade54 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Function/Level_9.c.trace @@ -0,0 +1 @@ +11794545348629460374 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality.c b/server/nng/build/ir/NNG/Levels/Inequality.c new file mode 100644 index 0000000..19c9284 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality.c @@ -0,0 +1,97 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality +// Imports: Init NNG.Levels.Inequality.Level_1 NNG.Levels.Inequality.Level_2 NNG.Levels.Inequality.Level_3 NNG.Levels.Inequality.Level_4 NNG.Levels.Inequality.Level_5 NNG.Levels.Inequality.Level_6 NNG.Levels.Inequality.Level_7 NNG.Levels.Inequality.Level_8 NNG.Levels.Inequality.Level_9 NNG.Levels.Inequality.Level_10 NNG.Levels.Inequality.Level_11 NNG.Levels.Inequality.Level_12 NNG.Levels.Inequality.Level_13 NNG.Levels.Inequality.Level_14 NNG.Levels.Inequality.Level_15 NNG.Levels.Inequality.Level_16 NNG.Levels.Inequality.Level_17 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__8(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__9(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__10(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__11(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__12(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__13(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__14(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__15(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__16(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Inequality_Level__17(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__9(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__10(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__11(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__12(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__13(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__14(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__15(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__16(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Inequality_Level__17(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality.c.trace b/server/nng/build/ir/NNG/Levels/Inequality.c.trace new file mode 100644 index 0000000..55184cc --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality.c.trace @@ -0,0 +1 @@ +9336489098668184658 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c new file mode 100644 index 0000000..93799f1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c.trace new file mode 100644 index 0000000..b5ffa38 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_1.c.trace @@ -0,0 +1 @@ +15715418939533793162 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c new file mode 100644 index 0000000..32776cd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_10 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__10(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c.trace new file mode 100644 index 0000000..eb78d47 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_10.c.trace @@ -0,0 +1 @@ +8366872987603129236 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c new file mode 100644 index 0000000..1d41270 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_11 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__11(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c.trace new file mode 100644 index 0000000..3e01f72 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_11.c.trace @@ -0,0 +1 @@ +9104254495681588724 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c new file mode 100644 index 0000000..3b5425a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_12 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__12(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c.trace new file mode 100644 index 0000000..5115864 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_12.c.trace @@ -0,0 +1 @@ +14766865931000247685 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c new file mode 100644 index 0000000..bf62bc0 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_13 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__13(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c.trace new file mode 100644 index 0000000..e9d270e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_13.c.trace @@ -0,0 +1 @@ +7236720961247687624 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c new file mode 100644 index 0000000..a76a602 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_14 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__14(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c.trace new file mode 100644 index 0000000..e65fa47 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_14.c.trace @@ -0,0 +1 @@ +17080990698887132932 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c new file mode 100644 index 0000000..3c9173d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_15 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__15(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c.trace new file mode 100644 index 0000000..9a7cd4e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_15.c.trace @@ -0,0 +1 @@ +15808132813580510808 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c new file mode 100644 index 0000000..068662e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_16 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__16(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c.trace new file mode 100644 index 0000000..65a9805 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_16.c.trace @@ -0,0 +1 @@ +7637579646193566177 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c new file mode 100644 index 0000000..7077e0f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_17 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__17(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c.trace new file mode 100644 index 0000000..1983d9c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_17.c.trace @@ -0,0 +1 @@ +14135338231934509378 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c new file mode 100644 index 0000000..5d37942 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c.trace new file mode 100644 index 0000000..6ada09d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_2.c.trace @@ -0,0 +1 @@ +10180719735176429031 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c new file mode 100644 index 0000000..3d54808 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c.trace new file mode 100644 index 0000000..3e40b0c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_3.c.trace @@ -0,0 +1 @@ +10425666160152371884 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c new file mode 100644 index 0000000..0e8a92b --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c.trace new file mode 100644 index 0000000..8aeaca9 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_4.c.trace @@ -0,0 +1 @@ +5262542741621948205 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c new file mode 100644 index 0000000..d3713ae --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c.trace new file mode 100644 index 0000000..e6f0c73 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_5.c.trace @@ -0,0 +1 @@ +10099871401285119100 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c new file mode 100644 index 0000000..0d6d71b --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c.trace new file mode 100644 index 0000000..02ff8cd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_6.c.trace @@ -0,0 +1 @@ +18291074078086778850 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c new file mode 100644 index 0000000..8e416bf --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c.trace new file mode 100644 index 0000000..ea65ccd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_7.c.trace @@ -0,0 +1 @@ +4948452312372643925 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c new file mode 100644 index 0000000..8b59cbd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c.trace new file mode 100644 index 0000000..4675054 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_8.c.trace @@ -0,0 +1 @@ +8910944482383625099 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c b/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c new file mode 100644 index 0000000..482d92d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Inequality.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Inequality_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c.trace new file mode 100644 index 0000000..3ed8de7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Inequality/Level_9.c.trace @@ -0,0 +1 @@ +10084756629938233881 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication.c b/server/nng/build/ir/NNG/Levels/Multiplication.c new file mode 100644 index 0000000..65d0279 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication.c @@ -0,0 +1,65 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication +// Imports: Init NNG.Levels.Multiplication.Level_1 NNG.Levels.Multiplication.Level_2 NNG.Levels.Multiplication.Level_3 NNG.Levels.Multiplication.Level_4 NNG.Levels.Multiplication.Level_5 NNG.Levels.Multiplication.Level_6 NNG.Levels.Multiplication.Level_7 NNG.Levels.Multiplication.Level_8 NNG.Levels.Multiplication.Level_9 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__8(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Multiplication_Level__9(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Multiplication_Level__9(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication.c.trace new file mode 100644 index 0000000..aa0fcb8 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication.c.trace @@ -0,0 +1 @@ +15100919068659915784 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c new file mode 100644 index 0000000..28fe579 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c.trace new file mode 100644 index 0000000..3ceaf84 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_1.c.trace @@ -0,0 +1 @@ +2681194911731925232 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c new file mode 100644 index 0000000..4944242 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c.trace new file mode 100644 index 0000000..51a6198 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_2.c.trace @@ -0,0 +1 @@ +10245843345607907477 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c new file mode 100644 index 0000000..a75be3f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c.trace new file mode 100644 index 0000000..35f0e4e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_3.c.trace @@ -0,0 +1 @@ +8940547588455067611 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c new file mode 100644 index 0000000..ac85175 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c.trace new file mode 100644 index 0000000..a872f1f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_4.c.trace @@ -0,0 +1 @@ +14993641720182264605 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c new file mode 100644 index 0000000..b5b1608 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c.trace new file mode 100644 index 0000000..8105ffd --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_5.c.trace @@ -0,0 +1 @@ +18175551488241716216 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c new file mode 100644 index 0000000..ea41cab --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c.trace new file mode 100644 index 0000000..2a12214 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_6.c.trace @@ -0,0 +1 @@ +14531862140867195758 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c new file mode 100644 index 0000000..135c507 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c.trace new file mode 100644 index 0000000..ffc70ae --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_7.c.trace @@ -0,0 +1 @@ +15474257035701176495 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c new file mode 100644 index 0000000..0995e5b --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c.trace new file mode 100644 index 0000000..5757f7c --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_8.c.trace @@ -0,0 +1 @@ +3648854208530401287 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c b/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c new file mode 100644 index 0000000..3fec2ad --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Multiplication.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Multiplication_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c.trace new file mode 100644 index 0000000..2b1f5bf --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Multiplication/Level_9.c.trace @@ -0,0 +1 @@ +4975536308483488989 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power.c b/server/nng/build/ir/NNG/Levels/Power.c new file mode 100644 index 0000000..bd1a706 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power.c @@ -0,0 +1,61 @@ +// Lean compiler output +// Module: NNG.Levels.Power +// Imports: Init NNG.Levels.Power.Level_1 NNG.Levels.Power.Level_2 NNG.Levels.Power.Level_3 NNG.Levels.Power.Level_4 NNG.Levels.Power.Level_5 NNG.Levels.Power.Level_6 NNG.Levels.Power.Level_7 NNG.Levels.Power.Level_8 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Power_Level__8(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Power_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power.c.trace b/server/nng/build/ir/NNG/Levels/Power.c.trace new file mode 100644 index 0000000..30f497d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power.c.trace @@ -0,0 +1 @@ +12255441869344750286 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_1.c b/server/nng/build/ir/NNG/Levels/Power/Level_1.c new file mode 100644 index 0000000..ef1b1c9 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_1.c.trace new file mode 100644 index 0000000..1d06499 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_1.c.trace @@ -0,0 +1 @@ +3557218418934706832 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_2.c b/server/nng/build/ir/NNG/Levels/Power/Level_2.c new file mode 100644 index 0000000..9079e5b --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_2.c.trace new file mode 100644 index 0000000..f8ba540 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_2.c.trace @@ -0,0 +1 @@ +3161955687484215514 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_3.c b/server/nng/build/ir/NNG/Levels/Power/Level_3.c new file mode 100644 index 0000000..20b2663 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_3.c.trace new file mode 100644 index 0000000..e72a579 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_3.c.trace @@ -0,0 +1 @@ +13739636179189224786 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_4.c b/server/nng/build/ir/NNG/Levels/Power/Level_4.c new file mode 100644 index 0000000..bfe83ea --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_4.c.trace new file mode 100644 index 0000000..9672833 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_4.c.trace @@ -0,0 +1 @@ +2643256504804179665 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_5.c b/server/nng/build/ir/NNG/Levels/Power/Level_5.c new file mode 100644 index 0000000..76575a7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_5.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_5.c.trace new file mode 100644 index 0000000..b91249f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_5.c.trace @@ -0,0 +1 @@ +14401556251889401930 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_6.c b/server/nng/build/ir/NNG/Levels/Power/Level_6.c new file mode 100644 index 0000000..b3f3fd1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_6.c.trace new file mode 100644 index 0000000..83f1ba1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_6.c.trace @@ -0,0 +1 @@ +16899530818829903575 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_7.c b/server/nng/build/ir/NNG/Levels/Power/Level_7.c new file mode 100644 index 0000000..c8b95d0 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_7.c.trace new file mode 100644 index 0000000..36ca048 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_7.c.trace @@ -0,0 +1 @@ +8728766979918631633 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_8.c b/server/nng/build/ir/NNG/Levels/Power/Level_8.c new file mode 100644 index 0000000..aa403b9 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_8.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Power.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Power_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Power/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/Power/Level_8.c.trace new file mode 100644 index 0000000..83efa59 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Power/Level_8.c.trace @@ -0,0 +1 @@ +16000363894567288792 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition.c b/server/nng/build/ir/NNG/Levels/Proposition.c new file mode 100644 index 0000000..f31e1eb --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition.c @@ -0,0 +1,61 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition +// Imports: Init NNG.Levels.Proposition.Level_1 NNG.Levels.Proposition.Level_2 NNG.Levels.Proposition.Level_3 NNG.Levels.Proposition.Level_4 NNG.Levels.Proposition.Level_5 NNG.Levels.Proposition.Level_6 NNG.Levels.Proposition.Level_7 NNG.Levels.Proposition.Level_8 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__4(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__5(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__6(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__7(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Proposition_Level__8(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__5(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__6(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__7(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Proposition_Level__8(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition.c.trace b/server/nng/build/ir/NNG/Levels/Proposition.c.trace new file mode 100644 index 0000000..91cc1cc --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition.c.trace @@ -0,0 +1 @@ +8034725322126254406 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c new file mode 100644 index 0000000..5da8568 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c.trace new file mode 100644 index 0000000..71d00c7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_1.c.trace @@ -0,0 +1 @@ +18179347340463669579 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c new file mode 100644 index 0000000..23ab12d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c.trace new file mode 100644 index 0000000..9622df1 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_2.c.trace @@ -0,0 +1 @@ +13217430201083326791 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c new file mode 100644 index 0000000..6ac78d7 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c.trace new file mode 100644 index 0000000..32f55cb --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_3.c.trace @@ -0,0 +1 @@ +5299063203734346172 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c new file mode 100644 index 0000000..ce268b9 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c.trace new file mode 100644 index 0000000..619fbad --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_4.c.trace @@ -0,0 +1 @@ +7415905544244480042 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c new file mode 100644 index 0000000..b4b1602 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_5 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__5(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c.trace new file mode 100644 index 0000000..067710f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_5.c.trace @@ -0,0 +1 @@ +10613228186954229021 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c new file mode 100644 index 0000000..456f58a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_6 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__6(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c.trace new file mode 100644 index 0000000..a0c149e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_6.c.trace @@ -0,0 +1 @@ +7894357058058824740 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c new file mode 100644 index 0000000..8281a79 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_7 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__7(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c.trace new file mode 100644 index 0000000..f619780 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_7.c.trace @@ -0,0 +1 @@ +16656846323211551510 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c new file mode 100644 index 0000000..350ff4d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c @@ -0,0 +1,41 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_8 +// Imports: Init NNG.Metadata NNG.MyNat.Addition NNG.MyNat.Theorems.Proposition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Theorems_Proposition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__8(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Theorems_Proposition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c.trace new file mode 100644 index 0000000..ba8e72d --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_8.c.trace @@ -0,0 +1 @@ +13601220282574937828 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c b/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c new file mode 100644 index 0000000..11f600f --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Proposition.Level_9 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Proposition_Level__9(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c.trace b/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c.trace new file mode 100644 index 0000000..4a5bc97 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Proposition/Level_9.c.trace @@ -0,0 +1 @@ +15399361750882572321 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Tutorial.c b/server/nng/build/ir/NNG/Levels/Tutorial.c new file mode 100644 index 0000000..a24d933 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial.c @@ -0,0 +1,45 @@ +// Lean compiler output +// Module: NNG.Levels.Tutorial +// Imports: Init NNG.Levels.Tutorial.Level_1 NNG.Levels.Tutorial.Level_2 NNG.Levels.Tutorial.Level_3 NNG.Levels.Tutorial.Level_4 +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Tutorial_Level__1(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Tutorial_Level__2(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Tutorial_Level__3(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Levels_Tutorial_Level__4(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Tutorial(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Tutorial_Level__1(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Tutorial_Level__2(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Tutorial_Level__3(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Levels_Tutorial_Level__4(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Tutorial.c.trace b/server/nng/build/ir/NNG/Levels/Tutorial.c.trace new file mode 100644 index 0000000..f666963 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial.c.trace @@ -0,0 +1 @@ +1595615440839641244 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c b/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c new file mode 100644 index 0000000..ae6752a --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Tutorial.Level_1 +// Imports: Init NNG.Metadata NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Tutorial_Level__1(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c.trace b/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c.trace new file mode 100644 index 0000000..029fdab --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_1.c.trace @@ -0,0 +1 @@ +17057151196775041350 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c b/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c new file mode 100644 index 0000000..6244a6e --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Tutorial.Level_2 +// Imports: Init NNG.Metadata NNG.MyNat.Multiplication +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Tutorial_Level__2(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Multiplication(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c.trace b/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c.trace new file mode 100644 index 0000000..f0c7b10 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_2.c.trace @@ -0,0 +1 @@ +2087975388406110178 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c b/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c new file mode 100644 index 0000000..455b9b0 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Tutorial.Level_3 +// Imports: Init NNG.Metadata NNG.MyNat.Definition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Definition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Tutorial_Level__3(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Definition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c.trace b/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c.trace new file mode 100644 index 0000000..4568320 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_3.c.trace @@ -0,0 +1 @@ +2143617200443064964 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c b/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c new file mode 100644 index 0000000..6d85b72 --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.Levels.Tutorial.Level_4 +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Levels_Tutorial_Level__4(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c.trace b/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c.trace new file mode 100644 index 0000000..03fc4ca --- /dev/null +++ b/server/nng/build/ir/NNG/Levels/Tutorial/Level_4.c.trace @@ -0,0 +1 @@ +7407492338022565581 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Metadata.c b/server/nng/build/ir/NNG/Metadata.c new file mode 100644 index 0000000..364d1ee --- /dev/null +++ b/server/nng/build/ir/NNG/Metadata.c @@ -0,0 +1,49 @@ +// Lean compiler output +// Module: NNG.Metadata +// Imports: Init GameServer.Commands NNG.Doc.Tactics NNG.Doc.Lemmas NNG.Doc.Definitions NNG.Modifications.Tactics +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_GameServer_Commands(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Doc_Tactics(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Doc_Lemmas(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Doc_Definitions(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Modifications_Tactics(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_GameServer_Commands(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Doc_Tactics(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Doc_Lemmas(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Doc_Definitions(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Modifications_Tactics(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Metadata.c.trace b/server/nng/build/ir/NNG/Metadata.c.trace new file mode 100644 index 0000000..0a81af6 --- /dev/null +++ b/server/nng/build/ir/NNG/Metadata.c.trace @@ -0,0 +1 @@ +10126315224814379241 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/Modifications/Tactics.c b/server/nng/build/ir/NNG/Modifications/Tactics.c new file mode 100644 index 0000000..23f8c1d --- /dev/null +++ b/server/nng/build/ir/NNG/Modifications/Tactics.c @@ -0,0 +1,3061 @@ +// Lean compiler output +// Module: NNG.Modifications.Tactics +// Imports: Init Mathlib.Lean.Expr.Basic NNG.MyNat.Addition Lean.Elab.Tactic.Basic +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* l_Lean_Meta_getElimInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_FVarSubst_apply(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_induction; +lean_object* l___private_Init_Util_0__outOfBounds___rarg(lean_object*); +static lean_object* l_MyNat_induction___closed__14; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7; +lean_object* l_Lean_Elab_Tactic_withRWRulesSeq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_throwTacticEx___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(lean_object*, lean_object*); +static lean_object* l_MyNat_rfl___closed__4; +extern lean_object* l_Lean_Parser_Tactic_location; +static lean_object* l_MyNat_induction___closed__7; +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_ElimApp_evalNames(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_expandOptLocation(lean_object*); +lean_object* l_Lean_Meta_mkGeneralizationForbiddenSet(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_evalRfl___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Expr_sort___override(lean_object*); +lean_object* lean_array_push(lean_object*, lean_object*); +lean_object* l_Lean_MVarId_assign___at_Lean_Elab_Tactic_closeMainGoal___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_mk_array(lean_object*, lean_object*); +uint8_t lean_usize_dec_eq(size_t, size_t); +static lean_object* l_MyNat_induction___closed__11; +lean_object* l_Lean_Syntax_getArgs(lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__10; +lean_object* l_Lean_replaceRef(lean_object*, lean_object*); +extern lean_object* l_Lean_Parser_Tactic_casesTarget; +lean_object* lean_array_fget(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_getMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_MVarId_getTag(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__24; +lean_object* l_Lean_MVarId_refl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); +static lean_object* l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1; +LEAN_EXPORT lean_object* l_MyNat_evalRfl(lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__7; +static lean_object* l_MyNat_rewriteSeq___closed__5; +static lean_object* l_MyNat_induction___closed__12; +lean_object* l_Lean_Elab_Tactic_throwNoGoalsToBeSolved___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_throwUnsupportedSyntax___at_Std_Tactic___aux__Std__Tactic__ShowTerm______elabRules__Std__Tactic__showTermTac__1___spec__1___rarg(lean_object*); +lean_object* l_Lean_MVarId_withContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__12; +static lean_object* l_MyNat_evalRewriteSeq___lambda__2___closed__1; +lean_object* l_Lean_Elab_Tactic_ElimApp_mkElimApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_appendTR___rarg(lean_object*, lean_object*); +size_t lean_usize_of_nat(lean_object*); +lean_object* l_Lean_Elab_Tactic_getNameOfIdent_x27(lean_object*); +lean_object* l_Lean_Elab_Tactic_getUnsolvedGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__15; +static lean_object* l_MyNat_induction___closed__17; +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___boxed(lean_object**); +static lean_object* l_MyNat_rewriteSeq___closed__11; +lean_object* l_Lean_Elab_Tactic_withLocation(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_rewriteLocalDecl(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_SourceInfo_fromRef(lean_object*, uint8_t); +static lean_object* l_MyNat_rewriteSeq___closed__1; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4; +static lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1; +static lean_object* l_MyNat_induction___closed__8; +static lean_object* l_MyNat_evalRewriteSeq___lambda__2___closed__4; +extern lean_object* l_Lean_Parser_Tactic_rwRuleSeq; +lean_object* l_Lean_Elab_Tactic_elabCasesTargets(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_withMainContext___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6; +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_to_list(lean_object*, lean_object*); +lean_object* l_Lean_MVarId_withContext___at_Lean_Elab_Tactic_withMainContext___spec__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__20; +static lean_object* l_MyNat_induction___closed__9; +LEAN_EXPORT lean_object* l_MyNat_evalRfl___boxed(lean_object*); +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__3(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_levelZero; +lean_object* l_Lean_MVarId_revert(lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_instInhabitedExpr; +lean_object* l_Lean_Meta_addImplicitTargets(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rfl___closed__2; +static lean_object* l_MyNat_induction___closed__15; +static lean_object* l_MyNat_rewriteSeq___closed__6; +lean_object* l_Lean_Expr_addLocalVarInfoForBinderIdent(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getSepArgs(lean_object*); +static lean_object* l_MyNat_induction___closed__16; +lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__1(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__22; +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1; +static lean_object* l_MyNat_rfl___closed__1; +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__3; +static lean_object* l_MyNat_evalRfl___rarg___closed__1; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2; +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5; +lean_object* l_Array_append___rarg(lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_rewriteTarget___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__14; +static lean_object* l_MyNat_induction___closed__10; +static lean_object* l_MyNat_rewriteSeq___closed__9; +lean_object* l_Lean_Name_mkStr6(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__1; +static lean_object* l_MyNat_rewriteSeq___closed__2; +lean_object* l_Lean_Meta_introNCore(lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8; +static lean_object* l_MyNat_evalRewriteSeq___lambda__2___closed__5; +static lean_object* l_MyNat_induction___closed__5; +static lean_object* l_MyNat_rewriteSeq___closed__4; +static lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2; +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +uint8_t lean_nat_dec_lt(lean_object*, lean_object*); +static lean_object* l_MyNat_evalRewriteSeq___lambda__3___closed__1; +lean_object* l_Lean_Name_mkStr2(lean_object*, lean_object*); +static lean_object* l_MyNat_rfl___closed__3; +static lean_object* l_MyNat_induction___closed__21; +lean_object* l_Lean_Meta_getFVarSetToGeneralize(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_node1(lean_object*, lean_object*, lean_object*); +extern lean_object* l_Lean_binderIdent; +lean_object* l_Lean_RBTree_toArray___at_Lean_Meta_getFVarsToGeneralize___spec__1(lean_object*); +static lean_object* l_MyNat_induction___closed__4; +static lean_object* l_MyNat_induction___closed__2; +lean_object* lean_nat_sub(lean_object*, lean_object*); +lean_object* l_Lean_MVarId_tryClear(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__23; +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_ElimApp_evalNames___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_elabRewriteConfig(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_List_splitAtD___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_List_reverse___rarg(lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__3; +LEAN_EXPORT lean_object* l_MyNat_rfl; +size_t lean_usize_add(size_t, size_t); +static lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__13; +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_uget(lean_object*, size_t); +lean_object* l_Lean_Expr_fvar___override(lean_object*); +static lean_object* l_MyNat_induction___closed__19; +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_rewriteSeq___closed__8; +extern lean_object* l_Lean_Parser_Tactic_config; +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9; +lean_object* l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_evalRfl___rarg___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Meta_sortFVarIds(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_evalInduction_checkTargets(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_array_get_size(lean_object*); +lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalInduction___spec__2(size_t, size_t, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_rewriteSeq; +uint8_t lean_nat_dec_le(lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__6; +uint8_t lean_usize_dec_lt(size_t, size_t); +lean_object* l_Lean_Meta_Cases_unifyEqs_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_setGoals(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__18; +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__1(lean_object*, lean_object*); +lean_object* l_Lean_Expr_mvarId_x21(lean_object*); +static lean_object* l_MyNat_evalRewriteSeq___lambda__2___closed__3; +lean_object* l_Lean_Elab_Tactic_replaceMainGoal(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Elab_Tactic_ElimApp_setMotiveArg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_evalRewriteSeq___lambda__2___closed__2; +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +static lean_object* l_MyNat_induction___closed__13; +static lean_object* _init_l_MyNat_rewriteSeq___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("MyNat", 5); +return x_1; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("rewriteSeq", 10); +return x_1; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__1; +x_2 = l_MyNat_rewriteSeq___closed__2; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("andthen", 7); +return x_1; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_MyNat_rewriteSeq___closed__4; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("rw", 2); +return x_1; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__7() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__6; +x_2 = 0; +x_3 = lean_alloc_ctor(6, 1, 1); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__8() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("optional", 8); +return x_1; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_MyNat_rewriteSeq___closed__8; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__9; +x_2 = l_Lean_Parser_Tactic_config; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_rewriteSeq___closed__7; +x_3 = l_MyNat_rewriteSeq___closed__10; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__12() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_rewriteSeq___closed__11; +x_3 = l_Lean_Parser_Tactic_rwRuleSeq; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__9; +x_2 = l_Lean_Parser_Tactic_location; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__14() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_rewriteSeq___closed__12; +x_3 = l_MyNat_rewriteSeq___closed__13; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_rewriteSeq___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__3; +x_2 = lean_unsigned_to_nat(1022u); +x_3 = l_MyNat_rewriteSeq___closed__14; +x_4 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_rewriteSeq() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_rewriteSeq___closed__15; +return x_1; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__1(lean_object* x_1, uint8_t x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Lean_Elab_Tactic_rewriteLocalDecl(x_1, x_2, x_4, x_3, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_14; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("rewrite", 7); +return x_1; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_MyNat_evalRewriteSeq___lambda__2___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__2___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("did not find instance of the pattern in the current goal", 56); +return x_1; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__2___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_evalRewriteSeq___lambda__2___closed__3; +x_2 = lean_alloc_ctor(3, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__2___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_evalRewriteSeq___lambda__2___closed__4; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = l_MyNat_evalRewriteSeq___lambda__2___closed__2; +x_12 = l_MyNat_evalRewriteSeq___lambda__2___closed__5; +x_13 = l_Lean_Meta_throwTacticEx___rarg(x_11, x_1, x_12, x_6, x_7, x_8, x_9, x_10); +return x_13; +} +} +static lean_object* _init_l_MyNat_evalRewriteSeq___lambda__3___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_MyNat_evalRewriteSeq___lambda__2___boxed), 10, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__3(lean_object* x_1, lean_object* x_2, uint8_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_box(x_3); +lean_inc(x_1); +lean_inc(x_4); +x_15 = lean_alloc_closure((void*)(l_MyNat_evalRewriteSeq___lambda__1___boxed), 13, 3); +lean_closure_set(x_15, 0, x_4); +lean_closure_set(x_15, 1, x_14); +lean_closure_set(x_15, 2, x_1); +x_16 = lean_box(x_3); +x_17 = lean_alloc_closure((void*)(l_Lean_Elab_Tactic_rewriteTarget___boxed), 12, 3); +lean_closure_set(x_17, 0, x_4); +lean_closure_set(x_17, 1, x_16); +lean_closure_set(x_17, 2, x_1); +x_18 = l_MyNat_evalRewriteSeq___lambda__3___closed__1; +x_19 = l_Lean_Elab_Tactic_withLocation(x_2, x_15, x_17, x_18, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_19; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; +x_11 = lean_unsigned_to_nat(1u); +x_12 = l_Lean_Syntax_getArg(x_1, x_11); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +x_13 = l_Lean_Elab_Tactic_elabRewriteConfig(x_12, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_12); +if (lean_obj_tag(x_13) == 0) +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +x_14 = lean_ctor_get(x_13, 0); +lean_inc(x_14); +x_15 = lean_ctor_get(x_13, 1); +lean_inc(x_15); +lean_dec(x_13); +x_16 = lean_unsigned_to_nat(3u); +x_17 = l_Lean_Syntax_getArg(x_1, x_16); +x_18 = l_Lean_Elab_Tactic_expandOptLocation(x_17); +lean_dec(x_17); +x_19 = lean_unsigned_to_nat(0u); +x_20 = l_Lean_Syntax_getArg(x_1, x_19); +x_21 = lean_unsigned_to_nat(2u); +x_22 = l_Lean_Syntax_getArg(x_1, x_21); +x_23 = lean_alloc_closure((void*)(l_MyNat_evalRewriteSeq___lambda__3___boxed), 13, 2); +lean_closure_set(x_23, 0, x_14); +lean_closure_set(x_23, 1, x_18); +x_24 = l_Lean_Elab_Tactic_withRWRulesSeq(x_20, x_22, x_23, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_15); +lean_dec(x_22); +return x_24; +} +else +{ +uint8_t x_25; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_25 = !lean_is_exclusive(x_13); +if (x_25 == 0) +{ +return x_13; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; +x_26 = lean_ctor_get(x_13, 0); +x_27 = lean_ctor_get(x_13, 1); +lean_inc(x_27); +lean_inc(x_26); +lean_dec(x_13); +x_28 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_28, 0, x_26); +lean_ctor_set(x_28, 1, x_27); +return x_28; +} +} +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; lean_object* x_15; +x_14 = lean_unbox(x_2); +lean_dec(x_2); +x_15 = l_MyNat_evalRewriteSeq___lambda__1(x_1, x_14, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +return x_15; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_MyNat_evalRewriteSeq___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +return x_11; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; lean_object* x_15; +x_14 = lean_unbox(x_3); +lean_dec(x_3); +x_15 = l_MyNat_evalRewriteSeq___lambda__3(x_1, x_2, x_14, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_2); +return x_15; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRewriteSeq___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; +x_11 = l_MyNat_evalRewriteSeq(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +lean_dec(x_1); +return x_11; +} +} +LEAN_EXPORT lean_object* l_List_mapTR_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__1(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_3; +x_3 = l_List_reverse___rarg(x_2); +return x_3; +} +else +{ +uint8_t x_4; +x_4 = !lean_is_exclusive(x_1); +if (x_4 == 0) +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; +x_5 = lean_ctor_get(x_1, 0); +x_6 = lean_ctor_get(x_1, 1); +x_7 = lean_unsigned_to_nat(0u); +x_8 = l_Lean_Syntax_getArg(x_5, x_7); +lean_dec(x_5); +x_9 = l_Lean_Elab_Tactic_getNameOfIdent_x27(x_8); +lean_dec(x_8); +lean_ctor_set(x_1, 1, x_2); +lean_ctor_set(x_1, 0, x_9); +{ +lean_object* _tmp_0 = x_6; +lean_object* _tmp_1 = x_1; +x_1 = _tmp_0; +x_2 = _tmp_1; +} +goto _start; +} +else +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; +x_11 = lean_ctor_get(x_1, 0); +x_12 = lean_ctor_get(x_1, 1); +lean_inc(x_12); +lean_inc(x_11); +lean_dec(x_1); +x_13 = lean_unsigned_to_nat(0u); +x_14 = l_Lean_Syntax_getArg(x_11, x_13); +lean_dec(x_11); +x_15 = l_Lean_Elab_Tactic_getNameOfIdent_x27(x_14); +lean_dec(x_14); +x_16 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_16, 0, x_15); +lean_ctor_set(x_16, 1, x_2); +x_1 = x_12; +x_2 = x_16; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +uint8_t x_14; +x_14 = lean_usize_dec_lt(x_5, x_4); +if (x_14 == 0) +{ +lean_object* x_15; +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +x_15 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_15, 0, x_6); +lean_ctor_set(x_15, 1, x_13); +return x_15; +} +else +{ +lean_object* x_16; +x_16 = lean_array_uget(x_3, x_5); +if (lean_obj_tag(x_6) == 0) +{ +lean_object* x_17; +lean_dec(x_16); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_6); +lean_ctor_set(x_17, 1, x_13); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_18 = lean_ctor_get(x_6, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_6, 1); +lean_inc(x_19); +lean_dec(x_6); +x_20 = l_Lean_Expr_fvar___override(x_16); +x_21 = l_Lean_Meta_FVarSubst_apply(x_1, x_20); +x_22 = lean_alloc_closure((void*)(l_Lean_Expr_addLocalVarInfoForBinderIdent), 9, 2); +lean_closure_set(x_22, 0, x_21); +lean_closure_set(x_22, 1, x_18); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_2); +x_23 = l_Lean_MVarId_withContext___at_Lean_Elab_Term_logUnassignedUsingErrorInfos___spec__4___rarg(x_2, x_22, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; size_t x_25; size_t x_26; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = 1; +x_26 = lean_usize_add(x_5, x_25); +x_5 = x_26; +x_6 = x_19; +x_13 = x_24; +goto _start; +} +else +{ +uint8_t x_28; +lean_dec(x_19); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_2); +x_28 = !lean_is_exclusive(x_23); +if (x_28 == 0) +{ +return x_23; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_23, 0); +x_30 = lean_ctor_get(x_23, 1); +lean_inc(x_30); +lean_inc(x_29); +lean_dec(x_23); +x_31 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_31, 0, x_29); +lean_ctor_set(x_31, 1, x_30); +return x_31; +} +} +} +} +} +} +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +uint8_t x_10; +x_10 = lean_usize_dec_eq(x_2, x_3); +if (x_10 == 0) +{ +lean_object* x_11; lean_object* x_12; +x_11 = lean_array_uget(x_1, x_2); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +x_12 = l_Lean_MVarId_tryClear(x_4, x_11, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_12) == 0) +{ +lean_object* x_13; lean_object* x_14; size_t x_15; size_t x_16; +x_13 = lean_ctor_get(x_12, 0); +lean_inc(x_13); +x_14 = lean_ctor_get(x_12, 1); +lean_inc(x_14); +lean_dec(x_12); +x_15 = 1; +x_16 = lean_usize_add(x_2, x_15); +x_2 = x_16; +x_4 = x_13; +x_9 = x_14; +goto _start; +} +else +{ +uint8_t x_18; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_18 = !lean_is_exclusive(x_12); +if (x_18 == 0) +{ +return x_12; +} +else +{ +lean_object* x_19; lean_object* x_20; lean_object* x_21; +x_19 = lean_ctor_get(x_12, 0); +x_20 = lean_ctor_get(x_12, 1); +lean_inc(x_20); +lean_inc(x_19); +lean_dec(x_12); +x_21 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_21, 0, x_19); +lean_ctor_set(x_21, 1, x_20); +return x_21; +} +} +} +else +{ +lean_object* x_22; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +x_22 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_22, 0, x_4); +lean_ctor_set(x_22, 1, x_9); +return x_22; +} +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = 0; +x_3 = l_Lean_SourceInfo_fromRef(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean", 4); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Parser", 6); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Term", 4); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("hole", 4); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2; +x_2 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3; +x_3 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4; +x_4 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5; +x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("_", 1); +return x_1; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1; +x_2 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7; +x_3 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1; +x_2 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6; +x_3 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8; +x_4 = l_Lean_Syntax_node1(x_1, x_2, x_3); +return x_4; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, size_t x_6, size_t x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +_start: +{ +uint8_t x_16; +x_16 = lean_usize_dec_lt(x_7, x_6); +if (x_16 == 0) +{ +lean_object* x_17; +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_17 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_17, 0, x_8); +lean_ctor_set(x_17, 1, x_15); +return x_17; +} +else +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_18 = lean_array_uget(x_5, x_7); +x_26 = lean_ctor_get(x_18, 0); +lean_inc(x_26); +x_27 = lean_ctor_get(x_18, 2); +lean_inc(x_27); +lean_dec(x_18); +x_28 = lean_ctor_get(x_8, 0); +lean_inc(x_28); +x_29 = lean_ctor_get(x_8, 1); +lean_inc(x_29); +if (lean_is_exclusive(x_8)) { + lean_ctor_release(x_8, 0); + lean_ctor_release(x_8, 1); + x_30 = x_8; +} else { + lean_dec_ref(x_8); + x_30 = lean_box(0); +} +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_1); +x_31 = l___private_Lean_Elab_Tactic_Induction_0__Lean_Elab_Tactic_ElimApp_getAltNumFields(x_1, x_26, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +if (lean_obj_tag(x_31) == 0) +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; uint8_t x_40; lean_object* x_41; +x_32 = lean_ctor_get(x_31, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_31, 1); +lean_inc(x_33); +lean_dec(x_31); +x_34 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9; +lean_inc(x_32); +x_35 = l_List_splitAtD___rarg(x_32, x_28, x_34); +x_36 = lean_ctor_get(x_35, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_35, 1); +lean_inc(x_37); +lean_dec(x_35); +x_38 = lean_box(0); +lean_inc(x_36); +x_39 = l_List_mapTR_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__1(x_36, x_38); +x_40 = 0; +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +x_41 = l_Lean_Meta_introNCore(x_27, x_32, x_39, x_40, x_40, x_11, x_12, x_13, x_14, x_33); +if (lean_obj_tag(x_41) == 0) +{ +lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; +x_42 = lean_ctor_get(x_41, 0); +lean_inc(x_42); +x_43 = lean_ctor_get(x_41, 1); +lean_inc(x_43); +lean_dec(x_41); +x_44 = lean_ctor_get(x_42, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_42, 1); +lean_inc(x_45); +lean_dec(x_42); +x_46 = lean_box(0); +x_47 = lean_box(0); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_2); +x_48 = l_Lean_Meta_Cases_unifyEqs_x3f(x_2, x_45, x_46, x_47, x_11, x_12, x_13, x_14, x_43); +if (lean_obj_tag(x_48) == 0) +{ +lean_object* x_49; +x_49 = lean_ctor_get(x_48, 0); +lean_inc(x_49); +if (lean_obj_tag(x_49) == 0) +{ +lean_object* x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_44); +lean_dec(x_36); +x_50 = lean_ctor_get(x_48, 1); +lean_inc(x_50); +lean_dec(x_48); +if (lean_is_scalar(x_30)) { + x_51 = lean_alloc_ctor(0, 2, 0); +} else { + x_51 = x_30; +} +lean_ctor_set(x_51, 0, x_37); +lean_ctor_set(x_51, 1, x_29); +x_52 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_52, 0, x_51); +x_19 = x_52; +x_20 = x_50; +goto block_25; +} +else +{ +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; uint8_t x_72; lean_object* x_73; +x_53 = lean_ctor_get(x_49, 0); +lean_inc(x_53); +lean_dec(x_49); +x_54 = lean_ctor_get(x_48, 1); +lean_inc(x_54); +lean_dec(x_48); +x_55 = lean_ctor_get(x_53, 0); +lean_inc(x_55); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_56); +lean_dec(x_53); +x_72 = 1; +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_3); +x_73 = l_Lean_Meta_introNCore(x_55, x_3, x_38, x_40, x_72, x_11, x_12, x_13, x_14, x_54); +if (lean_obj_tag(x_73) == 0) +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; uint8_t x_79; +x_74 = lean_ctor_get(x_73, 0); +lean_inc(x_74); +x_75 = lean_ctor_get(x_73, 1); +lean_inc(x_75); +lean_dec(x_73); +x_76 = lean_ctor_get(x_74, 1); +lean_inc(x_76); +lean_dec(x_74); +x_77 = lean_array_get_size(x_4); +x_78 = lean_unsigned_to_nat(0u); +x_79 = lean_nat_dec_lt(x_78, x_77); +if (x_79 == 0) +{ +lean_dec(x_77); +x_57 = x_76; +x_58 = x_75; +goto block_71; +} +else +{ +uint8_t x_80; +x_80 = lean_nat_dec_le(x_77, x_77); +if (x_80 == 0) +{ +lean_dec(x_77); +x_57 = x_76; +x_58 = x_75; +goto block_71; +} +else +{ +size_t x_81; size_t x_82; lean_object* x_83; +x_81 = 0; +x_82 = lean_usize_of_nat(x_77); +lean_dec(x_77); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +x_83 = l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3(x_4, x_81, x_82, x_76, x_11, x_12, x_13, x_14, x_75); +if (lean_obj_tag(x_83) == 0) +{ +lean_object* x_84; lean_object* x_85; +x_84 = lean_ctor_get(x_83, 0); +lean_inc(x_84); +x_85 = lean_ctor_get(x_83, 1); +lean_inc(x_85); +lean_dec(x_83); +x_57 = x_84; +x_58 = x_85; +goto block_71; +} +else +{ +uint8_t x_86; +lean_dec(x_56); +lean_dec(x_44); +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_86 = !lean_is_exclusive(x_83); +if (x_86 == 0) +{ +return x_83; +} +else +{ +lean_object* x_87; lean_object* x_88; lean_object* x_89; +x_87 = lean_ctor_get(x_83, 0); +x_88 = lean_ctor_get(x_83, 1); +lean_inc(x_88); +lean_inc(x_87); +lean_dec(x_83); +x_89 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_89, 0, x_87); +lean_ctor_set(x_89, 1, x_88); +return x_89; +} +} +} +} +} +else +{ +uint8_t x_90; +lean_dec(x_56); +lean_dec(x_44); +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_90 = !lean_is_exclusive(x_73); +if (x_90 == 0) +{ +return x_73; +} +else +{ +lean_object* x_91; lean_object* x_92; lean_object* x_93; +x_91 = lean_ctor_get(x_73, 0); +x_92 = lean_ctor_get(x_73, 1); +lean_inc(x_92); +lean_inc(x_91); +lean_dec(x_73); +x_93 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_93, 0, x_91); +lean_ctor_set(x_93, 1, x_92); +return x_93; +} +} +block_71: +{ +lean_object* x_59; size_t x_60; size_t x_61; lean_object* x_62; +x_59 = lean_array_get_size(x_44); +x_60 = lean_usize_of_nat(x_59); +lean_dec(x_59); +x_61 = 0; +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_10); +lean_inc(x_9); +lean_inc(x_57); +x_62 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2(x_56, x_57, x_44, x_60, x_61, x_36, x_9, x_10, x_11, x_12, x_13, x_14, x_58); +lean_dec(x_44); +lean_dec(x_56); +if (lean_obj_tag(x_62) == 0) +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_63 = lean_ctor_get(x_62, 1); +lean_inc(x_63); +lean_dec(x_62); +x_64 = lean_array_push(x_29, x_57); +if (lean_is_scalar(x_30)) { + x_65 = lean_alloc_ctor(0, 2, 0); +} else { + x_65 = x_30; +} +lean_ctor_set(x_65, 0, x_37); +lean_ctor_set(x_65, 1, x_64); +x_66 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_66, 0, x_65); +x_19 = x_66; +x_20 = x_63; +goto block_25; +} +else +{ +uint8_t x_67; +lean_dec(x_57); +lean_dec(x_37); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_67 = !lean_is_exclusive(x_62); +if (x_67 == 0) +{ +return x_62; +} +else +{ +lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_68 = lean_ctor_get(x_62, 0); +x_69 = lean_ctor_get(x_62, 1); +lean_inc(x_69); +lean_inc(x_68); +lean_dec(x_62); +x_70 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_70, 0, x_68); +lean_ctor_set(x_70, 1, x_69); +return x_70; +} +} +} +} +} +else +{ +uint8_t x_94; +lean_dec(x_44); +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_94 = !lean_is_exclusive(x_48); +if (x_94 == 0) +{ +return x_48; +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; +x_95 = lean_ctor_get(x_48, 0); +x_96 = lean_ctor_get(x_48, 1); +lean_inc(x_96); +lean_inc(x_95); +lean_dec(x_48); +x_97 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_97, 0, x_95); +lean_ctor_set(x_97, 1, x_96); +return x_97; +} +} +} +else +{ +uint8_t x_98; +lean_dec(x_37); +lean_dec(x_36); +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_98 = !lean_is_exclusive(x_41); +if (x_98 == 0) +{ +return x_41; +} +else +{ +lean_object* x_99; lean_object* x_100; lean_object* x_101; +x_99 = lean_ctor_get(x_41, 0); +x_100 = lean_ctor_get(x_41, 1); +lean_inc(x_100); +lean_inc(x_99); +lean_dec(x_41); +x_101 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_101, 0, x_99); +lean_ctor_set(x_101, 1, x_100); +return x_101; +} +} +} +else +{ +uint8_t x_102; +lean_dec(x_30); +lean_dec(x_29); +lean_dec(x_28); +lean_dec(x_27); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_102 = !lean_is_exclusive(x_31); +if (x_102 == 0) +{ +return x_31; +} +else +{ +lean_object* x_103; lean_object* x_104; lean_object* x_105; +x_103 = lean_ctor_get(x_31, 0); +x_104 = lean_ctor_get(x_31, 1); +lean_inc(x_104); +lean_inc(x_103); +lean_dec(x_31); +x_105 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_105, 0, x_103); +lean_ctor_set(x_105, 1, x_104); +return x_105; +} +} +block_25: +{ +lean_object* x_21; size_t x_22; size_t x_23; +x_21 = lean_ctor_get(x_19, 0); +lean_inc(x_21); +lean_dec(x_19); +x_22 = 1; +x_23 = lean_usize_add(x_7, x_22); +x_7 = x_23; +x_8 = x_21; +x_15 = x_20; +goto _start; +} +} +} +} +static lean_object* _init_l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_ElimApp_evalNames(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; size_t x_21; size_t x_22; lean_object* x_23; +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_3, x_14); +x_16 = l_Lean_Syntax_getArgs(x_15); +lean_dec(x_15); +x_17 = lean_array_to_list(lean_box(0), x_16); +x_18 = l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1; +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_17); +lean_ctor_set(x_19, 1, x_18); +x_20 = lean_array_get_size(x_2); +x_21 = lean_usize_of_nat(x_20); +lean_dec(x_20); +x_22 = 0; +x_23 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4(x_1, x_4, x_5, x_6, x_2, x_21, x_22, x_19, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +if (lean_obj_tag(x_23) == 0) +{ +uint8_t x_24; +x_24 = !lean_is_exclusive(x_23); +if (x_24 == 0) +{ +lean_object* x_25; lean_object* x_26; +x_25 = lean_ctor_get(x_23, 0); +x_26 = lean_ctor_get(x_25, 1); +lean_inc(x_26); +lean_dec(x_25); +lean_ctor_set(x_23, 0, x_26); +return x_23; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_27 = lean_ctor_get(x_23, 0); +x_28 = lean_ctor_get(x_23, 1); +lean_inc(x_28); +lean_inc(x_27); +lean_dec(x_23); +x_29 = lean_ctor_get(x_27, 1); +lean_inc(x_29); +lean_dec(x_27); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_28); +return x_30; +} +} +else +{ +uint8_t x_31; +x_31 = !lean_is_exclusive(x_23); +if (x_31 == 0) +{ +return x_23; +} +else +{ +lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_32 = lean_ctor_get(x_23, 0); +x_33 = lean_ctor_get(x_23, 1); +lean_inc(x_33); +lean_inc(x_32); +lean_dec(x_23); +x_34 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_34, 0, x_32); +lean_ctor_set(x_34, 1, x_33); +return x_34; +} +} +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +size_t x_14; size_t x_15; lean_object* x_16; +x_14 = lean_unbox_usize(x_4); +lean_dec(x_4); +x_15 = lean_unbox_usize(x_5); +lean_dec(x_5); +x_16 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__2(x_1, x_2, x_3, x_14, x_15, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_3); +lean_dec(x_1); +return x_16; +} +} +LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +size_t x_10; size_t x_11; lean_object* x_12; +x_10 = lean_unbox_usize(x_2); +lean_dec(x_2); +x_11 = lean_unbox_usize(x_3); +lean_dec(x_3); +x_12 = l_Array_foldlMUnsafe_fold___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__3(x_1, x_10, x_11, x_4, x_5, x_6, x_7, x_8, x_9); +lean_dec(x_1); +return x_12; +} +} +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15) { +_start: +{ +size_t x_16; size_t x_17; lean_object* x_18; +x_16 = lean_unbox_usize(x_6); +lean_dec(x_6); +x_17 = lean_unbox_usize(x_7); +lean_dec(x_7); +x_18 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4(x_1, x_2, x_3, x_4, x_5, x_16, x_17, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15); +lean_dec(x_5); +lean_dec(x_4); +return x_18; +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic_ElimApp_evalNames___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13) { +_start: +{ +lean_object* x_14; +x_14 = l_Lean_Parser_Tactic_ElimApp_evalNames(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13); +lean_dec(x_6); +lean_dec(x_3); +lean_dec(x_2); +return x_14; +} +} +static lean_object* _init_l_MyNat_induction___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Tactic", 6); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("_root_", 6); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("induction", 9); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_1 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2; +x_2 = l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3; +x_3 = l_MyNat_induction___closed__1; +x_4 = l_MyNat_induction___closed__2; +x_5 = l_MyNat_rewriteSeq___closed__1; +x_6 = l_MyNat_induction___closed__3; +x_7 = l_Lean_Name_mkStr6(x_1, x_2, x_3, x_4, x_5, x_6); +return x_7; +} +} +static lean_object* _init_l_MyNat_induction___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("induction ", 10); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__6() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_MyNat_induction___closed__5; +x_2 = 0; +x_3 = lean_alloc_ctor(6, 1, 1); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_induction___closed__7() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes(", ", 2); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__8() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_induction___closed__7; +x_2 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_induction___closed__9() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes(",", 1); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; uint8_t x_4; lean_object* x_5; +x_1 = l_Lean_Parser_Tactic_casesTarget; +x_2 = l_MyNat_induction___closed__9; +x_3 = l_MyNat_induction___closed__8; +x_4 = 0; +x_5 = lean_alloc_ctor(11, 3, 1); +lean_ctor_set(x_5, 0, x_1); +lean_ctor_set(x_5, 1, x_2); +lean_ctor_set(x_5, 2, x_3); +lean_ctor_set_uint8(x_5, sizeof(void*)*3, x_4); +return x_5; +} +} +static lean_object* _init_l_MyNat_induction___closed__11() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_induction___closed__6; +x_3 = l_MyNat_induction___closed__10; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_induction___closed__12() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes(" with ", 6); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__13() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_induction___closed__12; +x_2 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_induction___closed__14() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("many1", 5); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__15() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_MyNat_induction___closed__14; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_induction___closed__16() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("colGt", 5); +return x_1; +} +} +static lean_object* _init_l_MyNat_induction___closed__17() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_MyNat_induction___closed__16; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_induction___closed__18() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_induction___closed__17; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_induction___closed__19() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_induction___closed__18; +x_3 = l_Lean_binderIdent; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_induction___closed__20() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_induction___closed__15; +x_2 = l_MyNat_induction___closed__19; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_induction___closed__21() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_induction___closed__13; +x_3 = l_MyNat_induction___closed__20; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_induction___closed__22() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__9; +x_2 = l_MyNat_induction___closed__21; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_induction___closed__23() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rewriteSeq___closed__5; +x_2 = l_MyNat_induction___closed__11; +x_3 = l_MyNat_induction___closed__22; +x_4 = lean_alloc_ctor(2, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_induction___closed__24() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_induction___closed__4; +x_2 = lean_unsigned_to_nat(1022u); +x_3 = l_MyNat_induction___closed__23; +x_4 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_induction() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_induction___closed__24; +return x_1; +} +} +static lean_object* _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_levelZero; +x_2 = l_Lean_Expr_sort___override(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16, lean_object* x_17) { +_start: +{ +lean_object* x_18; +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +x_18 = l_Lean_Meta_mkGeneralizationForbiddenSet(x_1, x_2, x_13, x_14, x_15, x_16, x_17); +if (lean_obj_tag(x_18) == 0) +{ +lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_19 = lean_ctor_get(x_18, 0); +lean_inc(x_19); +x_20 = lean_ctor_get(x_18, 1); +lean_inc(x_20); +lean_dec(x_18); +x_21 = 0; +lean_inc(x_13); +x_22 = l_Lean_Meta_getFVarSetToGeneralize(x_1, x_19, x_21, x_13, x_14, x_15, x_16, x_20); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = l_Lean_RBTree_toArray___at_Lean_Meta_getFVarsToGeneralize___spec__1(x_23); +lean_inc(x_13); +x_26 = l_Lean_Meta_sortFVarIds(x_25, x_13, x_14, x_15, x_16, x_24); +x_27 = lean_ctor_get(x_26, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_26, 1); +lean_inc(x_28); +lean_dec(x_26); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +x_29 = l_Lean_MVarId_revert(x_3, x_27, x_21, x_21, x_13, x_14, x_15, x_16, x_28); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = lean_ctor_get(x_30, 0); +lean_inc(x_32); +x_33 = lean_ctor_get(x_30, 1); +lean_inc(x_33); +lean_dec(x_30); +lean_inc(x_33); +x_34 = l_Lean_MVarId_getTag(x_33, x_13, x_14, x_15, x_16, x_31); +if (lean_obj_tag(x_34) == 0) +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; +x_35 = lean_ctor_get(x_34, 0); +lean_inc(x_35); +x_36 = lean_ctor_get(x_34, 1); +lean_inc(x_36); +lean_dec(x_34); +x_37 = lean_ctor_get(x_15, 0); +lean_inc(x_37); +x_38 = lean_ctor_get(x_15, 1); +lean_inc(x_38); +x_39 = lean_ctor_get(x_15, 2); +lean_inc(x_39); +x_40 = lean_ctor_get(x_15, 3); +lean_inc(x_40); +x_41 = lean_ctor_get(x_15, 4); +lean_inc(x_41); +x_42 = lean_ctor_get(x_15, 5); +lean_inc(x_42); +x_43 = lean_ctor_get(x_15, 6); +lean_inc(x_43); +x_44 = lean_ctor_get(x_15, 7); +lean_inc(x_44); +x_45 = lean_ctor_get(x_15, 8); +lean_inc(x_45); +x_46 = lean_ctor_get(x_15, 9); +lean_inc(x_46); +x_47 = lean_ctor_get(x_15, 10); +lean_inc(x_47); +x_48 = l_Lean_replaceRef(x_4, x_42); +lean_dec(x_42); +x_49 = lean_alloc_ctor(0, 11, 0); +lean_ctor_set(x_49, 0, x_37); +lean_ctor_set(x_49, 1, x_38); +lean_ctor_set(x_49, 2, x_39); +lean_ctor_set(x_49, 3, x_40); +lean_ctor_set(x_49, 4, x_41); +lean_ctor_set(x_49, 5, x_48); +lean_ctor_set(x_49, 6, x_43); +lean_ctor_set(x_49, 7, x_44); +lean_ctor_set(x_49, 8, x_45); +lean_ctor_set(x_49, 9, x_46); +lean_ctor_set(x_49, 10, x_47); +lean_inc(x_16); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +lean_inc(x_5); +x_50 = l_Lean_Elab_Tactic_ElimApp_mkElimApp(x_5, x_1, x_35, x_11, x_12, x_13, x_14, x_49, x_16, x_36); +if (lean_obj_tag(x_50) == 0) +{ +lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_51 = lean_ctor_get(x_50, 0); +lean_inc(x_51); +x_52 = lean_ctor_get(x_50, 1); +lean_inc(x_52); +lean_dec(x_50); +x_53 = lean_ctor_get(x_51, 0); +lean_inc(x_53); +x_80 = lean_unsigned_to_nat(0u); +x_81 = l___private_Lean_Expr_0__Lean_Expr_getAppNumArgsAux(x_53, x_80); +x_82 = l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1; +lean_inc(x_81); +x_83 = lean_mk_array(x_81, x_82); +x_84 = lean_unsigned_to_nat(1u); +x_85 = lean_nat_sub(x_81, x_84); +lean_dec(x_81); +lean_inc(x_53); +x_86 = l___private_Lean_Expr_0__Lean_Expr_getAppArgsAux(x_53, x_83, x_85); +x_87 = lean_ctor_get(x_5, 1); +lean_inc(x_87); +x_88 = lean_array_get_size(x_86); +x_89 = lean_nat_dec_lt(x_87, x_88); +lean_dec(x_88); +if (x_89 == 0) +{ +lean_object* x_90; lean_object* x_91; +lean_dec(x_87); +lean_dec(x_86); +x_90 = l_Lean_instInhabitedExpr; +x_91 = l___private_Init_Util_0__outOfBounds___rarg(x_90); +x_54 = x_91; +goto block_79; +} +else +{ +lean_object* x_92; +x_92 = lean_array_fget(x_86, x_87); +lean_dec(x_87); +lean_dec(x_86); +x_54 = x_92; +goto block_79; +} +block_79: +{ +lean_object* x_55; lean_object* x_56; +x_55 = l_Lean_Expr_mvarId_x21(x_54); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_6); +lean_inc(x_33); +x_56 = l_Lean_Elab_Tactic_ElimApp_setMotiveArg(x_33, x_55, x_6, x_13, x_14, x_15, x_16, x_52); +if (lean_obj_tag(x_56) == 0) +{ +lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; +x_57 = lean_ctor_get(x_56, 1); +lean_inc(x_57); +lean_dec(x_56); +x_58 = l_Lean_MVarId_assign___at_Lean_Elab_Tactic_closeMainGoal___spec__1(x_33, x_53, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_57); +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +lean_dec(x_58); +x_60 = lean_ctor_get(x_51, 1); +lean_inc(x_60); +x_61 = lean_array_get_size(x_32); +lean_dec(x_32); +x_62 = lean_unsigned_to_nat(0u); +lean_inc(x_16); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_11); +x_63 = l_Lean_Parser_Tactic_ElimApp_evalNames(x_5, x_60, x_7, x_62, x_61, x_6, x_11, x_12, x_13, x_14, x_15, x_16, x_59); +lean_dec(x_6); +lean_dec(x_60); +if (lean_obj_tag(x_63) == 0) +{ +lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +x_64 = lean_ctor_get(x_63, 0); +lean_inc(x_64); +x_65 = lean_ctor_get(x_63, 1); +lean_inc(x_65); +lean_dec(x_63); +x_66 = lean_ctor_get(x_51, 2); +lean_inc(x_66); +lean_dec(x_51); +x_67 = l_Array_append___rarg(x_64, x_66); +x_68 = lean_array_to_list(lean_box(0), x_67); +x_69 = l_List_appendTR___rarg(x_68, x_8); +x_70 = l_Lean_Elab_Tactic_setGoals(x_69, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_65); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +return x_70; +} +else +{ +uint8_t x_71; +lean_dec(x_51); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +x_71 = !lean_is_exclusive(x_63); +if (x_71 == 0) +{ +return x_63; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_63, 0); +x_73 = lean_ctor_get(x_63, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_63); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +else +{ +uint8_t x_75; +lean_dec(x_53); +lean_dec(x_51); +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_75 = !lean_is_exclusive(x_56); +if (x_75 == 0) +{ +return x_56; +} +else +{ +lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_76 = lean_ctor_get(x_56, 0); +x_77 = lean_ctor_get(x_56, 1); +lean_inc(x_77); +lean_inc(x_76); +lean_dec(x_56); +x_78 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_78, 0, x_76); +lean_ctor_set(x_78, 1, x_77); +return x_78; +} +} +} +} +else +{ +uint8_t x_93; +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +x_93 = !lean_is_exclusive(x_50); +if (x_93 == 0) +{ +return x_50; +} +else +{ +lean_object* x_94; lean_object* x_95; lean_object* x_96; +x_94 = lean_ctor_get(x_50, 0); +x_95 = lean_ctor_get(x_50, 1); +lean_inc(x_95); +lean_inc(x_94); +lean_dec(x_50); +x_96 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_96, 0, x_94); +lean_ctor_set(x_96, 1, x_95); +return x_96; +} +} +} +else +{ +uint8_t x_97; +lean_dec(x_33); +lean_dec(x_32); +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_97 = !lean_is_exclusive(x_34); +if (x_97 == 0) +{ +return x_34; +} +else +{ +lean_object* x_98; lean_object* x_99; lean_object* x_100; +x_98 = lean_ctor_get(x_34, 0); +x_99 = lean_ctor_get(x_34, 1); +lean_inc(x_99); +lean_inc(x_98); +lean_dec(x_34); +x_100 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_100, 0, x_98); +lean_ctor_set(x_100, 1, x_99); +return x_100; +} +} +} +else +{ +uint8_t x_101; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_1); +x_101 = !lean_is_exclusive(x_29); +if (x_101 == 0) +{ +return x_29; +} +else +{ +lean_object* x_102; lean_object* x_103; lean_object* x_104; +x_102 = lean_ctor_get(x_29, 0); +x_103 = lean_ctor_get(x_29, 1); +lean_inc(x_103); +lean_inc(x_102); +lean_dec(x_29); +x_104 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_104, 0, x_102); +lean_ctor_set(x_104, 1, x_103); +return x_104; +} +} +} +else +{ +uint8_t x_105; +lean_dec(x_16); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_8); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_3); +lean_dec(x_1); +x_105 = !lean_is_exclusive(x_18); +if (x_105 == 0) +{ +return x_18; +} +else +{ +lean_object* x_106; lean_object* x_107; lean_object* x_108; +x_106 = lean_ctor_get(x_18, 0); +x_107 = lean_ctor_get(x_18, 1); +lean_inc(x_107); +lean_inc(x_106); +lean_dec(x_18); +x_108 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_108, 0, x_106); +lean_ctor_set(x_108, 1, x_107); +return x_108; +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12, lean_object* x_13, lean_object* x_14, lean_object* x_15, lean_object* x_16) { +_start: +{ +lean_object* x_17; +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +x_17 = l_Lean_Meta_getElimInfo(x_1, x_2, x_12, x_13, x_14, x_15, x_16); +if (lean_obj_tag(x_17) == 0) +{ +lean_object* x_18; lean_object* x_19; lean_object* x_20; +x_18 = lean_ctor_get(x_17, 0); +lean_inc(x_18); +x_19 = lean_ctor_get(x_17, 1); +lean_inc(x_19); +lean_dec(x_17); +lean_inc(x_15); +lean_inc(x_14); +lean_inc(x_13); +lean_inc(x_12); +lean_inc(x_18); +x_20 = l_Lean_Meta_addImplicitTargets(x_18, x_3, x_12, x_13, x_14, x_15, x_19); +if (lean_obj_tag(x_20) == 0) +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_20, 0); +lean_inc(x_21); +x_22 = lean_ctor_get(x_20, 1); +lean_inc(x_22); +lean_dec(x_20); +x_23 = l_Lean_Elab_Tactic_evalInduction_checkTargets(x_21, x_12, x_13, x_14, x_15, x_22); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; size_t x_26; size_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_24 = lean_ctor_get(x_23, 1); +lean_inc(x_24); +lean_dec(x_23); +x_25 = lean_array_get_size(x_21); +x_26 = lean_usize_of_nat(x_25); +lean_dec(x_25); +x_27 = 0; +lean_inc(x_21); +x_28 = l_Array_mapMUnsafe_map___at_Lean_Elab_Tactic_evalInduction___spec__2(x_26, x_27, x_21); +x_29 = lean_box(0); +lean_inc(x_4); +x_30 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___boxed), 17, 8); +lean_closure_set(x_30, 0, x_21); +lean_closure_set(x_30, 1, x_29); +lean_closure_set(x_30, 2, x_4); +lean_closure_set(x_30, 3, x_5); +lean_closure_set(x_30, 4, x_18); +lean_closure_set(x_30, 5, x_28); +lean_closure_set(x_30, 6, x_6); +lean_closure_set(x_30, 7, x_7); +x_31 = l_Lean_MVarId_withContext___at_Lean_Elab_Tactic_withMainContext___spec__1___rarg(x_4, x_30, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_24); +return x_31; +} +else +{ +uint8_t x_32; +lean_dec(x_21); +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_32 = !lean_is_exclusive(x_23); +if (x_32 == 0) +{ +return x_23; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_23, 0); +x_34 = lean_ctor_get(x_23, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_23); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +uint8_t x_36; +lean_dec(x_18); +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +x_36 = !lean_is_exclusive(x_20); +if (x_36 == 0) +{ +return x_20; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_20, 0); +x_38 = lean_ctor_get(x_20, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_20); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +uint8_t x_40; +lean_dec(x_15); +lean_dec(x_14); +lean_dec(x_13); +lean_dec(x_12); +lean_dec(x_11); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +x_40 = !lean_is_exclusive(x_17); +if (x_40 == 0) +{ +return x_17; +} +else +{ +lean_object* x_41; lean_object* x_42; lean_object* x_43; +x_41 = lean_ctor_get(x_17, 0); +x_42 = lean_ctor_get(x_17, 1); +lean_inc(x_42); +lean_inc(x_41); +lean_dec(x_17); +x_43 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_43, 0, x_41); +lean_ctor_set(x_43, 1, x_42); +return x_43; +} +} +} +} +static lean_object* _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("rec'", 4); +return x_1; +} +} +static lean_object* _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__1; +x_2 = l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) { +_start: +{ +lean_object* x_11; uint8_t x_12; +x_11 = l_MyNat_induction___closed__4; +lean_inc(x_1); +x_12 = l_Lean_Syntax_isOfKind(x_1, x_11); +if (x_12 == 0) +{ +lean_object* x_13; +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_13 = l_Lean_Elab_throwUnsupportedSyntax___at_Std_Tactic___aux__Std__Tactic__ShowTerm______elabRules__Std__Tactic__showTermTac__1___spec__1___rarg(x_10); +return x_13; +} +else +{ +lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; +x_14 = lean_unsigned_to_nat(1u); +x_15 = l_Lean_Syntax_getArg(x_1, x_14); +x_16 = lean_unsigned_to_nat(2u); +x_17 = l_Lean_Syntax_getArg(x_1, x_16); +lean_dec(x_1); +x_18 = l_Lean_Syntax_getSepArgs(x_15); +lean_inc(x_9); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +x_19 = l_Lean_Elab_Tactic_elabCasesTargets(x_18, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10); +if (lean_obj_tag(x_19) == 0) +{ +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_20 = lean_ctor_get(x_19, 0); +lean_inc(x_20); +x_21 = lean_ctor_get(x_19, 1); +lean_inc(x_21); +lean_dec(x_19); +x_22 = l_Lean_Elab_Tactic_getUnsolvedGoals(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_21); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +if (lean_obj_tag(x_23) == 0) +{ +lean_object* x_24; lean_object* x_25; +lean_dec(x_20); +lean_dec(x_17); +lean_dec(x_15); +x_24 = lean_ctor_get(x_22, 1); +lean_inc(x_24); +lean_dec(x_22); +x_25 = l_Lean_Elab_Tactic_throwNoGoalsToBeSolved___rarg(x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_24); +return x_25; +} +else +{ +lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; +x_26 = lean_ctor_get(x_22, 1); +lean_inc(x_26); +lean_dec(x_22); +x_27 = lean_ctor_get(x_23, 0); +lean_inc(x_27); +x_28 = lean_ctor_get(x_23, 1); +lean_inc(x_28); +lean_dec(x_23); +x_29 = lean_box(0); +x_30 = l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2; +lean_inc(x_27); +x_31 = lean_alloc_closure((void*)(l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__2), 16, 7); +lean_closure_set(x_31, 0, x_30); +lean_closure_set(x_31, 1, x_29); +lean_closure_set(x_31, 2, x_20); +lean_closure_set(x_31, 3, x_27); +lean_closure_set(x_31, 4, x_15); +lean_closure_set(x_31, 5, x_17); +lean_closure_set(x_31, 6, x_28); +x_32 = l_Lean_MVarId_withContext___at_Lean_Elab_Tactic_withMainContext___spec__1___rarg(x_27, x_31, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_26); +return x_32; +} +} +else +{ +uint8_t x_33; +lean_dec(x_17); +lean_dec(x_15); +lean_dec(x_9); +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +x_33 = !lean_is_exclusive(x_19); +if (x_33 == 0) +{ +return x_19; +} +else +{ +lean_object* x_34; lean_object* x_35; lean_object* x_36; +x_34 = lean_ctor_get(x_19, 0); +x_35 = lean_ctor_get(x_19, 1); +lean_inc(x_35); +lean_inc(x_34); +lean_dec(x_19); +x_36 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_36, 0, x_34); +lean_ctor_set(x_36, 1, x_35); +return x_36; +} +} +} +} +} +LEAN_EXPORT lean_object* l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___boxed(lean_object** _args) { +lean_object* x_1 = _args[0]; +lean_object* x_2 = _args[1]; +lean_object* x_3 = _args[2]; +lean_object* x_4 = _args[3]; +lean_object* x_5 = _args[4]; +lean_object* x_6 = _args[5]; +lean_object* x_7 = _args[6]; +lean_object* x_8 = _args[7]; +lean_object* x_9 = _args[8]; +lean_object* x_10 = _args[9]; +lean_object* x_11 = _args[10]; +lean_object* x_12 = _args[11]; +lean_object* x_13 = _args[12]; +lean_object* x_14 = _args[13]; +lean_object* x_15 = _args[14]; +lean_object* x_16 = _args[15]; +lean_object* x_17 = _args[16]; +_start: +{ +lean_object* x_18; +x_18 = l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12, x_13, x_14, x_15, x_16, x_17); +lean_dec(x_10); +lean_dec(x_9); +lean_dec(x_7); +lean_dec(x_4); +return x_18; +} +} +static lean_object* _init_l_MyNat_rfl___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("rfl", 3); +return x_1; +} +} +static lean_object* _init_l_MyNat_rfl___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l_MyNat_rewriteSeq___closed__1; +x_2 = l_MyNat_rfl___closed__1; +x_3 = l_Lean_Name_mkStr2(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rfl___closed__3() { +_start: +{ +lean_object* x_1; uint8_t x_2; lean_object* x_3; +x_1 = l_MyNat_rfl___closed__1; +x_2 = 0; +x_3 = lean_alloc_ctor(6, 1, 1); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set_uint8(x_3, sizeof(void*)*1, x_2); +return x_3; +} +} +static lean_object* _init_l_MyNat_rfl___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_MyNat_rfl___closed__2; +x_2 = lean_unsigned_to_nat(1024u); +x_3 = l_MyNat_rfl___closed__3; +x_4 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_MyNat_rfl() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_rfl___closed__4; +return x_1; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRfl___rarg___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +lean_inc(x_5); +lean_inc(x_4); +lean_inc(x_3); +lean_inc(x_2); +lean_inc(x_1); +x_10 = l_Lean_Elab_Tactic_getMainGoal(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +if (lean_obj_tag(x_10) == 0) +{ +lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; +x_11 = lean_ctor_get(x_5, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_10, 0); +lean_inc(x_12); +x_13 = lean_ctor_get(x_10, 1); +lean_inc(x_13); +lean_dec(x_10); +x_14 = lean_ctor_get(x_5, 1); +lean_inc(x_14); +x_15 = lean_ctor_get(x_5, 2); +lean_inc(x_15); +x_16 = lean_ctor_get(x_5, 3); +lean_inc(x_16); +x_17 = lean_ctor_get(x_5, 4); +lean_inc(x_17); +x_18 = lean_ctor_get(x_5, 5); +lean_inc(x_18); +x_19 = !lean_is_exclusive(x_11); +if (x_19 == 0) +{ +uint8_t x_20; lean_object* x_21; lean_object* x_22; +x_20 = 2; +lean_ctor_set_uint8(x_11, 5, x_20); +x_21 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_21, 0, x_11); +lean_ctor_set(x_21, 1, x_14); +lean_ctor_set(x_21, 2, x_15); +lean_ctor_set(x_21, 3, x_16); +lean_ctor_set(x_21, 4, x_17); +lean_ctor_set(x_21, 5, x_18); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_22 = l_Lean_MVarId_refl(x_12, x_21, x_6, x_7, x_8, x_13); +if (lean_obj_tag(x_22) == 0) +{ +lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_23 = lean_ctor_get(x_22, 1); +lean_inc(x_23); +lean_dec(x_22); +x_24 = lean_box(0); +x_25 = l_Lean_Elab_Tactic_replaceMainGoal(x_24, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_23); +if (lean_obj_tag(x_25) == 0) +{ +uint8_t x_26; +x_26 = !lean_is_exclusive(x_25); +if (x_26 == 0) +{ +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_25, 0); +lean_dec(x_27); +x_28 = lean_box(0); +lean_ctor_set(x_25, 0, x_28); +return x_25; +} +else +{ +lean_object* x_29; lean_object* x_30; lean_object* x_31; +x_29 = lean_ctor_get(x_25, 1); +lean_inc(x_29); +lean_dec(x_25); +x_30 = lean_box(0); +x_31 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_31, 0, x_30); +lean_ctor_set(x_31, 1, x_29); +return x_31; +} +} +else +{ +uint8_t x_32; +x_32 = !lean_is_exclusive(x_25); +if (x_32 == 0) +{ +return x_25; +} +else +{ +lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_33 = lean_ctor_get(x_25, 0); +x_34 = lean_ctor_get(x_25, 1); +lean_inc(x_34); +lean_inc(x_33); +lean_dec(x_25); +x_35 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +return x_35; +} +} +} +else +{ +uint8_t x_36; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_36 = !lean_is_exclusive(x_22); +if (x_36 == 0) +{ +return x_22; +} +else +{ +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_22, 0); +x_38 = lean_ctor_get(x_22, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_22); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; +} +} +} +else +{ +uint8_t x_40; uint8_t x_41; uint8_t x_42; uint8_t x_43; uint8_t x_44; uint8_t x_45; uint8_t x_46; uint8_t x_47; uint8_t x_48; uint8_t x_49; uint8_t x_50; uint8_t x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; +x_40 = lean_ctor_get_uint8(x_11, 0); +x_41 = lean_ctor_get_uint8(x_11, 1); +x_42 = lean_ctor_get_uint8(x_11, 2); +x_43 = lean_ctor_get_uint8(x_11, 3); +x_44 = lean_ctor_get_uint8(x_11, 4); +x_45 = lean_ctor_get_uint8(x_11, 6); +x_46 = lean_ctor_get_uint8(x_11, 7); +x_47 = lean_ctor_get_uint8(x_11, 8); +x_48 = lean_ctor_get_uint8(x_11, 9); +x_49 = lean_ctor_get_uint8(x_11, 10); +x_50 = lean_ctor_get_uint8(x_11, 11); +x_51 = lean_ctor_get_uint8(x_11, 12); +lean_dec(x_11); +x_52 = 2; +x_53 = lean_alloc_ctor(0, 0, 13); +lean_ctor_set_uint8(x_53, 0, x_40); +lean_ctor_set_uint8(x_53, 1, x_41); +lean_ctor_set_uint8(x_53, 2, x_42); +lean_ctor_set_uint8(x_53, 3, x_43); +lean_ctor_set_uint8(x_53, 4, x_44); +lean_ctor_set_uint8(x_53, 5, x_52); +lean_ctor_set_uint8(x_53, 6, x_45); +lean_ctor_set_uint8(x_53, 7, x_46); +lean_ctor_set_uint8(x_53, 8, x_47); +lean_ctor_set_uint8(x_53, 9, x_48); +lean_ctor_set_uint8(x_53, 10, x_49); +lean_ctor_set_uint8(x_53, 11, x_50); +lean_ctor_set_uint8(x_53, 12, x_51); +x_54 = lean_alloc_ctor(0, 6, 0); +lean_ctor_set(x_54, 0, x_53); +lean_ctor_set(x_54, 1, x_14); +lean_ctor_set(x_54, 2, x_15); +lean_ctor_set(x_54, 3, x_16); +lean_ctor_set(x_54, 4, x_17); +lean_ctor_set(x_54, 5, x_18); +lean_inc(x_8); +lean_inc(x_7); +lean_inc(x_6); +x_55 = l_Lean_MVarId_refl(x_12, x_54, x_6, x_7, x_8, x_13); +if (lean_obj_tag(x_55) == 0) +{ +lean_object* x_56; lean_object* x_57; lean_object* x_58; +x_56 = lean_ctor_get(x_55, 1); +lean_inc(x_56); +lean_dec(x_55); +x_57 = lean_box(0); +x_58 = l_Lean_Elab_Tactic_replaceMainGoal(x_57, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_56); +if (lean_obj_tag(x_58) == 0) +{ +lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_59 = lean_ctor_get(x_58, 1); +lean_inc(x_59); +if (lean_is_exclusive(x_58)) { + lean_ctor_release(x_58, 0); + lean_ctor_release(x_58, 1); + x_60 = x_58; +} else { + lean_dec_ref(x_58); + x_60 = lean_box(0); +} +x_61 = lean_box(0); +if (lean_is_scalar(x_60)) { + x_62 = lean_alloc_ctor(0, 2, 0); +} else { + x_62 = x_60; +} +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_59); +return x_62; +} +else +{ +lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; +x_63 = lean_ctor_get(x_58, 0); +lean_inc(x_63); +x_64 = lean_ctor_get(x_58, 1); +lean_inc(x_64); +if (lean_is_exclusive(x_58)) { + lean_ctor_release(x_58, 0); + lean_ctor_release(x_58, 1); + x_65 = x_58; +} else { + lean_dec_ref(x_58); + x_65 = lean_box(0); +} +if (lean_is_scalar(x_65)) { + x_66 = lean_alloc_ctor(1, 2, 0); +} else { + x_66 = x_65; +} +lean_ctor_set(x_66, 0, x_63); +lean_ctor_set(x_66, 1, x_64); +return x_66; +} +} +else +{ +lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_67 = lean_ctor_get(x_55, 0); +lean_inc(x_67); +x_68 = lean_ctor_get(x_55, 1); +lean_inc(x_68); +if (lean_is_exclusive(x_55)) { + lean_ctor_release(x_55, 0); + lean_ctor_release(x_55, 1); + x_69 = x_55; +} else { + lean_dec_ref(x_55); + x_69 = lean_box(0); +} +if (lean_is_scalar(x_69)) { + x_70 = lean_alloc_ctor(1, 2, 0); +} else { + x_70 = x_69; +} +lean_ctor_set(x_70, 0, x_67); +lean_ctor_set(x_70, 1, x_68); +return x_70; +} +} +} +else +{ +uint8_t x_71; +lean_dec(x_8); +lean_dec(x_7); +lean_dec(x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); +x_71 = !lean_is_exclusive(x_10); +if (x_71 == 0) +{ +return x_10; +} +else +{ +lean_object* x_72; lean_object* x_73; lean_object* x_74; +x_72 = lean_ctor_get(x_10, 0); +x_73 = lean_ctor_get(x_10, 1); +lean_inc(x_73); +lean_inc(x_72); +lean_dec(x_10); +x_74 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_74, 0, x_72); +lean_ctor_set(x_74, 1, x_73); +return x_74; +} +} +} +} +static lean_object* _init_l_MyNat_evalRfl___rarg___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_MyNat_evalRfl___rarg___lambda__1), 9, 0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRfl___rarg(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +_start: +{ +lean_object* x_10; lean_object* x_11; +x_10 = l_MyNat_evalRfl___rarg___closed__1; +x_11 = l_Lean_Elab_Tactic_withMainContext___rarg(x_10, x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9); +return x_11; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRfl(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_alloc_closure((void*)(l_MyNat_evalRfl___rarg), 9, 0); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_evalRfl___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_evalRfl(x_1); +lean_dec(x_1); +return x_2; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_Mathlib_Lean_Expr_Basic(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +lean_object* initialize_Lean_Elab_Tactic_Basic(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_Modifications_Tactics(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Mathlib_Lean_Expr_Basic(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_Lean_Elab_Tactic_Basic(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_MyNat_rewriteSeq___closed__1 = _init_l_MyNat_rewriteSeq___closed__1(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__1); +l_MyNat_rewriteSeq___closed__2 = _init_l_MyNat_rewriteSeq___closed__2(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__2); +l_MyNat_rewriteSeq___closed__3 = _init_l_MyNat_rewriteSeq___closed__3(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__3); +l_MyNat_rewriteSeq___closed__4 = _init_l_MyNat_rewriteSeq___closed__4(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__4); +l_MyNat_rewriteSeq___closed__5 = _init_l_MyNat_rewriteSeq___closed__5(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__5); +l_MyNat_rewriteSeq___closed__6 = _init_l_MyNat_rewriteSeq___closed__6(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__6); +l_MyNat_rewriteSeq___closed__7 = _init_l_MyNat_rewriteSeq___closed__7(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__7); +l_MyNat_rewriteSeq___closed__8 = _init_l_MyNat_rewriteSeq___closed__8(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__8); +l_MyNat_rewriteSeq___closed__9 = _init_l_MyNat_rewriteSeq___closed__9(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__9); +l_MyNat_rewriteSeq___closed__10 = _init_l_MyNat_rewriteSeq___closed__10(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__10); +l_MyNat_rewriteSeq___closed__11 = _init_l_MyNat_rewriteSeq___closed__11(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__11); +l_MyNat_rewriteSeq___closed__12 = _init_l_MyNat_rewriteSeq___closed__12(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__12); +l_MyNat_rewriteSeq___closed__13 = _init_l_MyNat_rewriteSeq___closed__13(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__13); +l_MyNat_rewriteSeq___closed__14 = _init_l_MyNat_rewriteSeq___closed__14(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__14); +l_MyNat_rewriteSeq___closed__15 = _init_l_MyNat_rewriteSeq___closed__15(); +lean_mark_persistent(l_MyNat_rewriteSeq___closed__15); +l_MyNat_rewriteSeq = _init_l_MyNat_rewriteSeq(); +lean_mark_persistent(l_MyNat_rewriteSeq); +l_MyNat_evalRewriteSeq___lambda__2___closed__1 = _init_l_MyNat_evalRewriteSeq___lambda__2___closed__1(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__2___closed__1); +l_MyNat_evalRewriteSeq___lambda__2___closed__2 = _init_l_MyNat_evalRewriteSeq___lambda__2___closed__2(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__2___closed__2); +l_MyNat_evalRewriteSeq___lambda__2___closed__3 = _init_l_MyNat_evalRewriteSeq___lambda__2___closed__3(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__2___closed__3); +l_MyNat_evalRewriteSeq___lambda__2___closed__4 = _init_l_MyNat_evalRewriteSeq___lambda__2___closed__4(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__2___closed__4); +l_MyNat_evalRewriteSeq___lambda__2___closed__5 = _init_l_MyNat_evalRewriteSeq___lambda__2___closed__5(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__2___closed__5); +l_MyNat_evalRewriteSeq___lambda__3___closed__1 = _init_l_MyNat_evalRewriteSeq___lambda__3___closed__1(); +lean_mark_persistent(l_MyNat_evalRewriteSeq___lambda__3___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__1); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__2); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__3); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__4); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__5); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__6); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__7); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__8); +l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9 = _init_l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9(); +lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Parser_Tactic_ElimApp_evalNames___spec__4___closed__9); +l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1 = _init_l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic_ElimApp_evalNames___closed__1); +l_MyNat_induction___closed__1 = _init_l_MyNat_induction___closed__1(); +lean_mark_persistent(l_MyNat_induction___closed__1); +l_MyNat_induction___closed__2 = _init_l_MyNat_induction___closed__2(); +lean_mark_persistent(l_MyNat_induction___closed__2); +l_MyNat_induction___closed__3 = _init_l_MyNat_induction___closed__3(); +lean_mark_persistent(l_MyNat_induction___closed__3); +l_MyNat_induction___closed__4 = _init_l_MyNat_induction___closed__4(); +lean_mark_persistent(l_MyNat_induction___closed__4); +l_MyNat_induction___closed__5 = _init_l_MyNat_induction___closed__5(); +lean_mark_persistent(l_MyNat_induction___closed__5); +l_MyNat_induction___closed__6 = _init_l_MyNat_induction___closed__6(); +lean_mark_persistent(l_MyNat_induction___closed__6); +l_MyNat_induction___closed__7 = _init_l_MyNat_induction___closed__7(); +lean_mark_persistent(l_MyNat_induction___closed__7); +l_MyNat_induction___closed__8 = _init_l_MyNat_induction___closed__8(); +lean_mark_persistent(l_MyNat_induction___closed__8); +l_MyNat_induction___closed__9 = _init_l_MyNat_induction___closed__9(); +lean_mark_persistent(l_MyNat_induction___closed__9); +l_MyNat_induction___closed__10 = _init_l_MyNat_induction___closed__10(); +lean_mark_persistent(l_MyNat_induction___closed__10); +l_MyNat_induction___closed__11 = _init_l_MyNat_induction___closed__11(); +lean_mark_persistent(l_MyNat_induction___closed__11); +l_MyNat_induction___closed__12 = _init_l_MyNat_induction___closed__12(); +lean_mark_persistent(l_MyNat_induction___closed__12); +l_MyNat_induction___closed__13 = _init_l_MyNat_induction___closed__13(); +lean_mark_persistent(l_MyNat_induction___closed__13); +l_MyNat_induction___closed__14 = _init_l_MyNat_induction___closed__14(); +lean_mark_persistent(l_MyNat_induction___closed__14); +l_MyNat_induction___closed__15 = _init_l_MyNat_induction___closed__15(); +lean_mark_persistent(l_MyNat_induction___closed__15); +l_MyNat_induction___closed__16 = _init_l_MyNat_induction___closed__16(); +lean_mark_persistent(l_MyNat_induction___closed__16); +l_MyNat_induction___closed__17 = _init_l_MyNat_induction___closed__17(); +lean_mark_persistent(l_MyNat_induction___closed__17); +l_MyNat_induction___closed__18 = _init_l_MyNat_induction___closed__18(); +lean_mark_persistent(l_MyNat_induction___closed__18); +l_MyNat_induction___closed__19 = _init_l_MyNat_induction___closed__19(); +lean_mark_persistent(l_MyNat_induction___closed__19); +l_MyNat_induction___closed__20 = _init_l_MyNat_induction___closed__20(); +lean_mark_persistent(l_MyNat_induction___closed__20); +l_MyNat_induction___closed__21 = _init_l_MyNat_induction___closed__21(); +lean_mark_persistent(l_MyNat_induction___closed__21); +l_MyNat_induction___closed__22 = _init_l_MyNat_induction___closed__22(); +lean_mark_persistent(l_MyNat_induction___closed__22); +l_MyNat_induction___closed__23 = _init_l_MyNat_induction___closed__23(); +lean_mark_persistent(l_MyNat_induction___closed__23); +l_MyNat_induction___closed__24 = _init_l_MyNat_induction___closed__24(); +lean_mark_persistent(l_MyNat_induction___closed__24); +l_MyNat_induction = _init_l_MyNat_induction(); +lean_mark_persistent(l_MyNat_induction); +l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1 = _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___lambda__1___closed__1); +l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1 = _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1(); +lean_mark_persistent(l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__1); +l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2 = _init_l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2(); +lean_mark_persistent(l_Lean_Parser_Tactic___aux__NNG__Modifications__Tactics______elabRules__Lean__Parser__Tactic____root____MyNat__induction__1___closed__2); +l_MyNat_rfl___closed__1 = _init_l_MyNat_rfl___closed__1(); +lean_mark_persistent(l_MyNat_rfl___closed__1); +l_MyNat_rfl___closed__2 = _init_l_MyNat_rfl___closed__2(); +lean_mark_persistent(l_MyNat_rfl___closed__2); +l_MyNat_rfl___closed__3 = _init_l_MyNat_rfl___closed__3(); +lean_mark_persistent(l_MyNat_rfl___closed__3); +l_MyNat_rfl___closed__4 = _init_l_MyNat_rfl___closed__4(); +lean_mark_persistent(l_MyNat_rfl___closed__4); +l_MyNat_rfl = _init_l_MyNat_rfl(); +lean_mark_persistent(l_MyNat_rfl); +l_MyNat_evalRfl___rarg___closed__1 = _init_l_MyNat_evalRfl___rarg___closed__1(); +lean_mark_persistent(l_MyNat_evalRfl___rarg___closed__1); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/Modifications/Tactics.c.trace b/server/nng/build/ir/NNG/Modifications/Tactics.c.trace new file mode 100644 index 0000000..b8a6417 --- /dev/null +++ b/server/nng/build/ir/NNG/Modifications/Tactics.c.trace @@ -0,0 +1 @@ +14754082556322596060 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/MyNat/Addition.c b/server/nng/build/ir/NNG/MyNat/Addition.c new file mode 100644 index 0000000..db5eec9 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Addition.c @@ -0,0 +1,100 @@ +// Lean compiler output +// Module: NNG.MyNat.Addition +// Imports: Init NNG.MyNat.Definition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +static lean_object* l_MyNat_instAddMyNat___closed__1; +LEAN_EXPORT lean_object* l_MyNat_add___boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_instAddMyNat; +LEAN_EXPORT lean_object* l_MyNat_add(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_add(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_inc(x_1); +return x_1; +} +else +{ +uint8_t x_3; +x_3 = !lean_is_exclusive(x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; +x_4 = lean_ctor_get(x_2, 0); +x_5 = l_MyNat_add(x_1, x_4); +lean_ctor_set(x_2, 0, x_5); +return x_2; +} +else +{ +lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_6 = lean_ctor_get(x_2, 0); +lean_inc(x_6); +lean_dec(x_2); +x_7 = l_MyNat_add(x_1, x_6); +x_8 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_8, 0, x_7); +return x_8; +} +} +} +} +LEAN_EXPORT lean_object* l_MyNat_add___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_MyNat_add(x_1, x_2); +lean_dec(x_1); +return x_3; +} +} +static lean_object* _init_l_MyNat_instAddMyNat___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_MyNat_add___boxed), 2, 0); +return x_1; +} +} +static lean_object* _init_l_MyNat_instAddMyNat() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_instAddMyNat___closed__1; +return x_1; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Definition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Definition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_MyNat_instAddMyNat___closed__1 = _init_l_MyNat_instAddMyNat___closed__1(); +lean_mark_persistent(l_MyNat_instAddMyNat___closed__1); +l_MyNat_instAddMyNat = _init_l_MyNat_instAddMyNat(); +lean_mark_persistent(l_MyNat_instAddMyNat); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/MyNat/Addition.c.trace b/server/nng/build/ir/NNG/MyNat/Addition.c.trace new file mode 100644 index 0000000..9a68d6e --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Addition.c.trace @@ -0,0 +1 @@ +2760095421866741095 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/MyNat/Definition.c b/server/nng/build/ir/NNG/MyNat/Definition.c new file mode 100644 index 0000000..344c155 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Definition.c @@ -0,0 +1,799 @@ +// Lean compiler output +// Module: NNG.MyNat.Definition +// Imports: Init +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2; +LEAN_EXPORT lean_object* l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99____boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_instInhabitedMyNat; +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10; +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6; +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7; +lean_object* lean_mk_empty_array_with_capacity(lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1; +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9; +static lean_object* l_term_u2115___closed__5; +LEAN_EXPORT lean_object* l_instInhabitedMyNat; +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3; +LEAN_EXPORT uint8_t l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99_(lean_object*, lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4; +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3; +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArgs(lean_object*); +static lean_object* l_term_u2115___closed__1; +lean_object* l_Lean_replaceRef(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_instToStringMyNat___boxed(lean_object*); +uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_one; +LEAN_EXPORT lean_object* l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15____boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_term_u2115; +lean_object* l_Lean_SourceInfo_fromRef(lean_object*, uint8_t); +LEAN_EXPORT lean_object* l_MyNat_ofNat(lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5; +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4; +LEAN_EXPORT lean_object* l_MyNat_myNatFromNat(lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7; +LEAN_EXPORT lean_object* l_MyNat_natFromMyNat(lean_object*); +LEAN_EXPORT uint8_t l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15_(lean_object*, lean_object*); +lean_object* l_Lean_addMacroScope(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_str___override(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_instToStringMyNat(lean_object*); +lean_object* l_Lean_Syntax_node2(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Syntax_getArg(lean_object*, lean_object*); +lean_object* l_Array_append___rarg(lean_object*, lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8; +static lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5; +static lean_object* l_MyNat_one___closed__2; +static lean_object* l_MyNat_one___closed__1; +uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +static lean_object* l_instBEqMyNat___closed__1; +lean_object* l_Lean_Syntax_node1(lean_object*, lean_object*, lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6; +lean_object* lean_nat_sub(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_myNatFromNat___boxed(lean_object*); +static lean_object* l_term_u2115___closed__4; +LEAN_EXPORT lean_object* l_MyNat_natFromMyNat___boxed(lean_object*); +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_Name_mkStr4(lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT uint8_t l_instDecidableEqMyNat(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_instDecidableEqMyNat___boxed(lean_object*, lean_object*); +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1; +lean_object* lean_nat_add(lean_object*, lean_object*); +static lean_object* l_term_u2115___closed__3; +static lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2; +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1(lean_object*, lean_object*, lean_object*); +lean_object* l_String_toSubstring_x27(lean_object*); +lean_object* l_Nat_repr(lean_object*); +static lean_object* l_term_u2115___closed__2; +LEAN_EXPORT lean_object* l_instBEqMyNat; +LEAN_EXPORT lean_object* l_MyNat_ofNat___boxed(lean_object*); +LEAN_EXPORT uint8_t l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15_(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 1; +return x_3; +} +else +{ +uint8_t x_4; +x_4 = 0; +return x_4; +} +} +else +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_5; +x_5 = 0; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +x_7 = lean_ctor_get(x_2, 0); +x_1 = x_6; +x_2 = x_7; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15____boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15_(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +static lean_object* _init_l_instBEqMyNat___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l___private_NNG_MyNat_Definition_0__beqMyNat____x40_NNG_MyNat_Definition___hyg_15____boxed), 2, 0); +return x_1; +} +} +static lean_object* _init_l_instBEqMyNat() { +_start: +{ +lean_object* x_1; +x_1 = l_instBEqMyNat___closed__1; +return x_1; +} +} +LEAN_EXPORT uint8_t l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99_(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_3; +x_3 = 1; +return x_3; +} +else +{ +uint8_t x_4; +x_4 = 0; +return x_4; +} +} +else +{ +if (lean_obj_tag(x_2) == 0) +{ +uint8_t x_5; +x_5 = 0; +return x_5; +} +else +{ +lean_object* x_6; lean_object* x_7; +x_6 = lean_ctor_get(x_1, 0); +x_7 = lean_ctor_get(x_2, 0); +x_1 = x_6; +x_2 = x_7; +goto _start; +} +} +} +} +LEAN_EXPORT lean_object* l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99____boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99_(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +LEAN_EXPORT uint8_t l_instDecidableEqMyNat(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; +x_3 = l___private_NNG_MyNat_Definition_0__decEqMyNat____x40_NNG_MyNat_Definition___hyg_99_(x_1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_instDecidableEqMyNat___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +uint8_t x_3; lean_object* x_4; +x_3 = l_instDecidableEqMyNat(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +x_4 = lean_box(x_3); +return x_4; +} +} +static lean_object* _init_l_instInhabitedMyNat() { +_start: +{ +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +static lean_object* _init_l_term_u2115___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("termℕ", 7); +return x_1; +} +} +static lean_object* _init_l_term_u2115___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l_term_u2115___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l_term_u2115___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("ℕ", 3); +return x_1; +} +} +static lean_object* _init_l_term_u2115___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_term_u2115___closed__3; +x_2 = lean_alloc_ctor(5, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_term_u2115___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; +x_1 = l_term_u2115___closed__2; +x_2 = lean_unsigned_to_nat(1024u); +x_3 = l_term_u2115___closed__4; +x_4 = lean_alloc_ctor(3, 3, 0); +lean_ctor_set(x_4, 0, x_1); +lean_ctor_set(x_4, 1, x_2); +lean_ctor_set(x_4, 2, x_3); +return x_4; +} +} +static lean_object* _init_l_term_u2115() { +_start: +{ +lean_object* x_1; +x_1 = l_term_u2115___closed__5; +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("MyNat", 5); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1; +x_2 = l_String_toSubstring_x27(x_1); +return x_2; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_2); +lean_ctor_set(x_3, 1, x_1); +return x_3; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4; +x_2 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6; +x_3 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_3, 0, x_1); +lean_ctor_set(x_3, 1, x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = l_term_u2115___closed__2; +x_5 = l_Lean_Syntax_isOfKind(x_1, x_4); +if (x_5 == 0) +{ +lean_object* x_6; lean_object* x_7; +lean_dec(x_2); +x_6 = lean_box(1); +x_7 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_7, 0, x_6); +lean_ctor_set(x_7, 1, x_3); +return x_7; +} +else +{ +lean_object* x_8; uint8_t x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; +x_8 = lean_ctor_get(x_2, 5); +lean_inc(x_8); +x_9 = 0; +x_10 = l_Lean_SourceInfo_fromRef(x_8, x_9); +x_11 = lean_ctor_get(x_2, 2); +lean_inc(x_11); +x_12 = lean_ctor_get(x_2, 1); +lean_inc(x_12); +lean_dec(x_2); +x_13 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3; +x_14 = l_Lean_addMacroScope(x_12, x_13, x_11); +x_15 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2; +x_16 = l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7; +x_17 = lean_alloc_ctor(3, 4, 0); +lean_ctor_set(x_17, 0, x_10); +lean_ctor_set(x_17, 1, x_15); +lean_ctor_set(x_17, 2, x_14); +lean_ctor_set(x_17, 3, x_16); +x_18 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_18, 0, x_17); +lean_ctor_set(x_18, 1, x_3); +return x_18; +} +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("ident", 5); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Lean", 4); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Parser", 6); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("Term", 4); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("app", 3); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; +x_1 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3; +x_2 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4; +x_3 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5; +x_4 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6; +x_5 = l_Lean_Name_mkStr4(x_1, x_2, x_3, x_4); +return x_5; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string_from_bytes("null", 4); +return x_1; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9() { +_start: +{ +lean_object* x_1; lean_object* x_2; lean_object* x_3; +x_1 = lean_box(0); +x_2 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8; +x_3 = l_Lean_Name_str___override(x_1, x_2); +return x_3; +} +} +static lean_object* _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = lean_mk_empty_array_with_capacity(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; uint8_t x_5; +x_4 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2; +lean_inc(x_1); +x_5 = l_Lean_Syntax_isOfKind(x_1, x_4); +if (x_5 == 0) +{ +lean_object* x_6; uint8_t x_7; +x_6 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7; +lean_inc(x_1); +x_7 = l_Lean_Syntax_isOfKind(x_1, x_6); +if (x_7 == 0) +{ +lean_object* x_8; lean_object* x_9; +lean_dec(x_1); +x_8 = lean_box(0); +x_9 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_9, 0, x_8); +lean_ctor_set(x_9, 1, x_3); +return x_9; +} +else +{ +lean_object* x_10; lean_object* x_11; uint8_t x_12; +x_10 = lean_unsigned_to_nat(0u); +x_11 = l_Lean_Syntax_getArg(x_1, x_10); +lean_inc(x_11); +x_12 = l_Lean_Syntax_isOfKind(x_11, x_4); +if (x_12 == 0) +{ +lean_object* x_13; lean_object* x_14; +lean_dec(x_11); +lean_dec(x_1); +x_13 = lean_box(0); +x_14 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_14, 0, x_13); +lean_ctor_set(x_14, 1, x_3); +return x_14; +} +else +{ +lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; uint8_t x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; +x_15 = lean_unsigned_to_nat(1u); +x_16 = l_Lean_Syntax_getArg(x_1, x_15); +lean_dec(x_1); +x_17 = l_Lean_Syntax_getArgs(x_16); +lean_dec(x_16); +x_18 = l_Lean_replaceRef(x_11, x_2); +lean_dec(x_11); +x_19 = 0; +x_20 = l_Lean_SourceInfo_fromRef(x_18, x_19); +x_21 = l_term_u2115___closed__3; +lean_inc(x_20); +x_22 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_22, 0, x_20); +lean_ctor_set(x_22, 1, x_21); +x_23 = l_term_u2115___closed__2; +lean_inc(x_20); +x_24 = l_Lean_Syntax_node1(x_20, x_23, x_22); +x_25 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10; +x_26 = l_Array_append___rarg(x_25, x_17); +x_27 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9; +lean_inc(x_20); +x_28 = lean_alloc_ctor(1, 3, 0); +lean_ctor_set(x_28, 0, x_20); +lean_ctor_set(x_28, 1, x_27); +lean_ctor_set(x_28, 2, x_26); +x_29 = l_Lean_Syntax_node2(x_20, x_6, x_24, x_28); +x_30 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_30, 0, x_29); +lean_ctor_set(x_30, 1, x_3); +return x_30; +} +} +} +else +{ +lean_object* x_31; uint8_t x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; +x_31 = l_Lean_replaceRef(x_1, x_2); +lean_dec(x_1); +x_32 = 0; +x_33 = l_Lean_SourceInfo_fromRef(x_31, x_32); +x_34 = l_term_u2115___closed__3; +lean_inc(x_33); +x_35 = lean_alloc_ctor(2, 2, 0); +lean_ctor_set(x_35, 0, x_33); +lean_ctor_set(x_35, 1, x_34); +x_36 = l_term_u2115___closed__2; +x_37 = l_Lean_Syntax_node1(x_33, x_36, x_35); +x_38 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_38, 0, x_37); +lean_ctor_set(x_38, 1, x_3); +return x_38; +} +} +} +LEAN_EXPORT lean_object* l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) { +_start: +{ +lean_object* x_4; +x_4 = l___aux__NNG__MyNat__Definition______unexpand__MyNat__1(x_1, x_2, x_3); +lean_dec(x_2); +return x_4; +} +} +static lean_object* _init_l_MyNat_instInhabitedMyNat() { +_start: +{ +lean_object* x_1; +x_1 = lean_box(0); +return x_1; +} +} +LEAN_EXPORT lean_object* l_MyNat_myNatFromNat(lean_object* x_1) { +_start: +{ +lean_object* x_2; uint8_t x_3; +x_2 = lean_unsigned_to_nat(0u); +x_3 = lean_nat_dec_eq(x_1, x_2); +if (x_3 == 0) +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; +x_4 = lean_unsigned_to_nat(1u); +x_5 = lean_nat_sub(x_1, x_4); +x_6 = l_MyNat_myNatFromNat(x_5); +lean_dec(x_5); +x_7 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_7, 0, x_6); +return x_7; +} +else +{ +lean_object* x_8; +x_8 = lean_box(0); +return x_8; +} +} +} +LEAN_EXPORT lean_object* l_MyNat_myNatFromNat___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_myNatFromNat(x_1); +lean_dec(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_natFromMyNat(lean_object* x_1) { +_start: +{ +if (lean_obj_tag(x_1) == 0) +{ +lean_object* x_2; +x_2 = lean_unsigned_to_nat(0u); +return x_2; +} +else +{ +lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_3 = lean_ctor_get(x_1, 0); +x_4 = l_MyNat_natFromMyNat(x_3); +x_5 = lean_unsigned_to_nat(1u); +x_6 = lean_nat_add(x_4, x_5); +lean_dec(x_4); +return x_6; +} +} +} +LEAN_EXPORT lean_object* l_MyNat_natFromMyNat___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_natFromMyNat(x_1); +lean_dec(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_ofNat(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_myNatFromNat(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_ofNat___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_ofNat(x_1); +lean_dec(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_instToStringMyNat(lean_object* x_1) { +_start: +{ +lean_object* x_2; lean_object* x_3; +x_2 = l_MyNat_natFromMyNat(x_1); +x_3 = l_Nat_repr(x_2); +return x_3; +} +} +LEAN_EXPORT lean_object* l_MyNat_instToStringMyNat___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = l_MyNat_instToStringMyNat(x_1); +lean_dec(x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_one___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_MyNat_myNatFromNat(x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_one___closed__2() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_MyNat_one___closed__1; +x_2 = lean_alloc_ctor(1, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +static lean_object* _init_l_MyNat_one() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_one___closed__2; +return x_1; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_MyNat_Definition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_instBEqMyNat___closed__1 = _init_l_instBEqMyNat___closed__1(); +lean_mark_persistent(l_instBEqMyNat___closed__1); +l_instBEqMyNat = _init_l_instBEqMyNat(); +lean_mark_persistent(l_instBEqMyNat); +l_instInhabitedMyNat = _init_l_instInhabitedMyNat(); +lean_mark_persistent(l_instInhabitedMyNat); +l_term_u2115___closed__1 = _init_l_term_u2115___closed__1(); +lean_mark_persistent(l_term_u2115___closed__1); +l_term_u2115___closed__2 = _init_l_term_u2115___closed__2(); +lean_mark_persistent(l_term_u2115___closed__2); +l_term_u2115___closed__3 = _init_l_term_u2115___closed__3(); +lean_mark_persistent(l_term_u2115___closed__3); +l_term_u2115___closed__4 = _init_l_term_u2115___closed__4(); +lean_mark_persistent(l_term_u2115___closed__4); +l_term_u2115___closed__5 = _init_l_term_u2115___closed__5(); +lean_mark_persistent(l_term_u2115___closed__5); +l_term_u2115 = _init_l_term_u2115(); +lean_mark_persistent(l_term_u2115); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__1); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__2); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__3); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__4); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__5); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__6); +l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7 = _init_l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______macroRules__term_u2115__1___closed__7); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__1); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__2); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__3); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__4); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__5); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__6); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__7); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__8); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__9); +l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10 = _init_l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10(); +lean_mark_persistent(l___aux__NNG__MyNat__Definition______unexpand__MyNat__1___closed__10); +l_MyNat_instInhabitedMyNat = _init_l_MyNat_instInhabitedMyNat(); +lean_mark_persistent(l_MyNat_instInhabitedMyNat); +l_MyNat_one___closed__1 = _init_l_MyNat_one___closed__1(); +lean_mark_persistent(l_MyNat_one___closed__1); +l_MyNat_one___closed__2 = _init_l_MyNat_one___closed__2(); +lean_mark_persistent(l_MyNat_one___closed__2); +l_MyNat_one = _init_l_MyNat_one(); +lean_mark_persistent(l_MyNat_one); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/MyNat/Definition.c.trace b/server/nng/build/ir/NNG/MyNat/Definition.c.trace new file mode 100644 index 0000000..78e3290 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Definition.c.trace @@ -0,0 +1 @@ +6972496789146285202 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/MyNat/Multiplication.c b/server/nng/build/ir/NNG/MyNat/Multiplication.c new file mode 100644 index 0000000..9da0f29 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Multiplication.c @@ -0,0 +1,100 @@ +// Lean compiler output +// Module: NNG.MyNat.Multiplication +// Imports: Init NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +LEAN_EXPORT lean_object* l_MyNat_instMulMyNat; +static lean_object* l_MyNat_instMulMyNat___closed__1; +lean_object* l_MyNat_myNatFromNat(lean_object*); +LEAN_EXPORT lean_object* l_MyNat_mul___boxed(lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_MyNat_mul(lean_object*, lean_object*); +lean_object* l_MyNat_add(lean_object*, lean_object*); +static lean_object* l_MyNat_mul___closed__1; +static lean_object* _init_l_MyNat_mul___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_unsigned_to_nat(0u); +x_2 = l_MyNat_myNatFromNat(x_1); +return x_2; +} +} +LEAN_EXPORT lean_object* l_MyNat_mul(lean_object* x_1, lean_object* x_2) { +_start: +{ +if (lean_obj_tag(x_2) == 0) +{ +lean_object* x_3; +x_3 = l_MyNat_mul___closed__1; +return x_3; +} +else +{ +lean_object* x_4; lean_object* x_5; lean_object* x_6; +x_4 = lean_ctor_get(x_2, 0); +x_5 = l_MyNat_mul(x_1, x_4); +x_6 = l_MyNat_add(x_1, x_5); +return x_6; +} +} +} +LEAN_EXPORT lean_object* l_MyNat_mul___boxed(lean_object* x_1, lean_object* x_2) { +_start: +{ +lean_object* x_3; +x_3 = l_MyNat_mul(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); +return x_3; +} +} +static lean_object* _init_l_MyNat_instMulMyNat___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_alloc_closure((void*)(l_MyNat_mul___boxed), 2, 0); +return x_1; +} +} +static lean_object* _init_l_MyNat_instMulMyNat() { +_start: +{ +lean_object* x_1; +x_1 = l_MyNat_instMulMyNat___closed__1; +return x_1; +} +} +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_MyNat_Multiplication(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +l_MyNat_mul___closed__1 = _init_l_MyNat_mul___closed__1(); +lean_mark_persistent(l_MyNat_mul___closed__1); +l_MyNat_instMulMyNat___closed__1 = _init_l_MyNat_instMulMyNat___closed__1(); +lean_mark_persistent(l_MyNat_instMulMyNat___closed__1); +l_MyNat_instMulMyNat = _init_l_MyNat_instMulMyNat(); +lean_mark_persistent(l_MyNat_instMulMyNat); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/MyNat/Multiplication.c.trace b/server/nng/build/ir/NNG/MyNat/Multiplication.c.trace new file mode 100644 index 0000000..a9ec026 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Multiplication.c.trace @@ -0,0 +1 @@ +2052634667963101258 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c b/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c new file mode 100644 index 0000000..a33cb00 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c @@ -0,0 +1,37 @@ +// Lean compiler output +// Module: NNG.MyNat.Theorems.Addition +// Imports: Init NNG.Metadata NNG.MyNat.Addition +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_Metadata(uint8_t builtin, lean_object*); +lean_object* initialize_NNG_MyNat_Addition(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_MyNat_Theorems_Addition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_Metadata(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +res = initialize_NNG_MyNat_Addition(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c.trace b/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c.trace new file mode 100644 index 0000000..bfa62e3 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Theorems/Addition.c.trace @@ -0,0 +1 @@ +3227530040224467366 \ No newline at end of file diff --git a/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c b/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c new file mode 100644 index 0000000..4175d5f --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c @@ -0,0 +1,29 @@ +// Lean compiler output +// Module: NNG.MyNat.Theorems.Proposition +// Imports: Init +#include +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wunused-parameter" +#pragma clang diagnostic ignored "-Wunused-label" +#elif defined(__GNUC__) && !defined(__CLANG__) +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-label" +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif +#ifdef __cplusplus +extern "C" { +#endif +lean_object* initialize_Init(uint8_t builtin, lean_object*); +static bool _G_initialized = false; +LEAN_EXPORT lean_object* initialize_NNG_MyNat_Theorems_Proposition(uint8_t builtin, lean_object* w) { +lean_object * res; +if (_G_initialized) return lean_io_result_mk_ok(lean_box(0)); +_G_initialized = true; +res = initialize_Init(builtin, lean_io_mk_world()); +if (lean_io_result_is_error(res)) return res; +lean_dec_ref(res); +return lean_io_result_mk_ok(lean_box(0)); +} +#ifdef __cplusplus +} +#endif diff --git a/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c.trace b/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c.trace new file mode 100644 index 0000000..3b33097 --- /dev/null +++ b/server/nng/build/ir/NNG/MyNat/Theorems/Proposition.c.trace @@ -0,0 +1 @@ +483796173031302994 \ No newline at end of file diff --git a/server/nng/build/lib/NNG.ilean b/server/nng/build/lib/NNG.ilean new file mode 100644 index 0000000..03c7188 --- /dev/null +++ b/server/nng/build/lib/NNG.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG.olean b/server/nng/build/lib/NNG.olean new file mode 100644 index 0000000..1712c51 Binary files /dev/null and b/server/nng/build/lib/NNG.olean differ diff --git a/server/nng/build/lib/NNG.trace b/server/nng/build/lib/NNG.trace new file mode 100644 index 0000000..813ce6e --- /dev/null +++ b/server/nng/build/lib/NNG.trace @@ -0,0 +1 @@ +7356427851528760174 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Definitions.ilean b/server/nng/build/lib/NNG/Doc/Definitions.ilean new file mode 100644 index 0000000..7158bdc --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Definitions.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Doc.Definitions"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Definitions.olean b/server/nng/build/lib/NNG/Doc/Definitions.olean new file mode 100644 index 0000000..5cb4d98 Binary files /dev/null and b/server/nng/build/lib/NNG/Doc/Definitions.olean differ diff --git a/server/nng/build/lib/NNG/Doc/Definitions.trace b/server/nng/build/lib/NNG/Doc/Definitions.trace new file mode 100644 index 0000000..a4001fc --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Definitions.trace @@ -0,0 +1 @@ +2922655963706979749 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Lemmas.ilean b/server/nng/build/lib/NNG/Doc/Lemmas.ilean new file mode 100644 index 0000000..128363e --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Lemmas.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Doc.Lemmas"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Lemmas.olean b/server/nng/build/lib/NNG/Doc/Lemmas.olean new file mode 100644 index 0000000..f3f354e Binary files /dev/null and b/server/nng/build/lib/NNG/Doc/Lemmas.olean differ diff --git a/server/nng/build/lib/NNG/Doc/Lemmas.trace b/server/nng/build/lib/NNG/Doc/Lemmas.trace new file mode 100644 index 0000000..a348b20 --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Lemmas.trace @@ -0,0 +1 @@ +16771103639053061509 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Tactics.ilean b/server/nng/build/lib/NNG/Doc/Tactics.ilean new file mode 100644 index 0000000..4722546 --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Tactics.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Doc.Tactics"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Doc/Tactics.olean b/server/nng/build/lib/NNG/Doc/Tactics.olean new file mode 100644 index 0000000..abbc514 Binary files /dev/null and b/server/nng/build/lib/NNG/Doc/Tactics.olean differ diff --git a/server/nng/build/lib/NNG/Doc/Tactics.trace b/server/nng/build/lib/NNG/Doc/Tactics.trace new file mode 100644 index 0000000..5a55535 --- /dev/null +++ b/server/nng/build/lib/NNG/Doc/Tactics.trace @@ -0,0 +1 @@ +5348243054589539109 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition.ilean b/server/nng/build/lib/NNG/Levels/Addition.ilean new file mode 100644 index 0000000..bc487b8 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Addition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition.olean b/server/nng/build/lib/NNG/Levels/Addition.olean new file mode 100644 index 0000000..fa6e4be Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition.trace b/server/nng/build/lib/NNG/Levels/Addition.trace new file mode 100644 index 0000000..97256e5 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition.trace @@ -0,0 +1 @@ +2084978910118405033 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_1.ilean new file mode 100644 index 0000000..bb66cc8 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.add_zero":{"usages":[[52,8,52,16]],"definition":null},"c:MyNat.add_succ":{"usages":[[57,8,57,16]],"definition":null},"c:MyNat":{"usages":[[40,9,40,10]],"definition":null},"c:Lean.Meta.tactic.hygienic":{"usages":[[10,11,10,26]],"definition":null}},"module":"NNG.Levels.Addition.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_1.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_1.olean new file mode 100644 index 0000000..05e0a5d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_1.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_1.trace new file mode 100644 index 0000000..09a9b3a --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_1.trace @@ -0,0 +1 @@ +5269099431713252405 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_2.ilean new file mode 100644 index 0000000..a4bb3ce --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.add_zero":{"usages":[[14,8,14,16],[52,6,52,14],[55,6,55,14]],"definition":null},"c:MyNat.add_succ":{"usages":[[16,8,16,16],[58,6,58,14],[59,6,59,14],[60,6,60,14]],"definition":null},"c:MyNat":{"usages":[[12,22,12,23],[36,13,36,14]],"definition":null},"c:AdditionWorld.zero_add":{"usages":[[45,8,45,16],[45,18,45,26]],"definition":[12,8,12,16]}},"module":"NNG.Levels.Addition.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_2.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_2.olean new file mode 100644 index 0000000..ea7bd68 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_2.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_2.trace new file mode 100644 index 0000000..14654bc --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_2.trace @@ -0,0 +1 @@ +17690234639472501785 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_3.ilean new file mode 100644 index 0000000..0af6240 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.succ":{"usages":[[47,16,47,20],[47,29,47,33]],"definition":null},"c:MyNat.add_zero":{"usages":[[15,8,15,16],[16,8,16,16],[54,8,54,16],[55,8,55,16]],"definition":null},"c:MyNat.add_succ":{"usages":[[18,8,18,16],[19,8,19,16],[20,8,20,16],[57,8,57,16],[59,8,59,16]],"definition":null},"c:MyNat":{"usages":[[13,27,13,28],[47,11,47,12]],"definition":null},"c:AdditionWorld.add_assoc":{"usages":[],"definition":[13,8,13,17]}},"module":"NNG.Levels.Addition.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_3.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_3.olean new file mode 100644 index 0000000..29c607a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_3.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_3.trace new file mode 100644 index 0000000..7d2c4df --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_3.trace @@ -0,0 +1 @@ +18302928042269315295 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_4.ilean new file mode 100644 index 0000000..c3a591a --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.succ":{"usages":[[13,29,13,33],[13,42,13,46]],"definition":null},"c:MyNat.add_zero":{"usages":[[15,8,15,16],[16,8,16,16],[39,10,39,18],[47,8,47,16]],"definition":null},"c:MyNat.add_succ":{"usages":[[18,8,18,16],[20,8,20,16],[43,10,43,18],[49,8,49,16]],"definition":null},"c:MyNat":{"usages":[[13,24,13,25],[35,11,35,12]],"definition":null},"c:AdditionWorld.zero_add":{"usages":[[38,10,38,18],[46,8,46,16]],"definition":null},"c:AdditionWorld.succ_add":{"usages":[[41,10,41,18],[51,8,51,16]],"definition":[13,8,13,16]}},"module":"NNG.Levels.Addition.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_4.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_4.olean new file mode 100644 index 0000000..5d36bd4 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_4.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_4.trace new file mode 100644 index 0000000..72e6acf --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_4.trace @@ -0,0 +1 @@ +12154535057277385306 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_5.ilean new file mode 100644 index 0000000..dea7a56 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.succ":{"usages":[[23,37,23,41],[45,14,45,18]],"definition":null},"c:MyNat.add_zero":{"usages":[[16,8,16,16],[48,6,48,14]],"definition":null},"c:MyNat.add_succ":{"usages":[[18,8,18,16],[47,6,47,14]],"definition":null},"c:MyNat":{"usages":[[13,24,13,25],[23,32,23,33],[45,9,45,10]],"definition":null},"c:AdditionWorld.zero_add":{"usages":[[15,8,15,16]],"definition":null},"c:AdditionWorld.succ_add":{"usages":[[20,8,20,16]],"definition":null},"c:AdditionWorld.one_eq_succ_zero":{"usages":[[46,6,46,22]],"definition":[23,8,23,24]},"c:AdditionWorld.add_comm":{"usages":[],"definition":[13,8,13,16]}},"module":"NNG.Levels.Addition.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_5.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_5.olean new file mode 100644 index 0000000..8c8847d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_5.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_5.trace new file mode 100644 index 0000000..b660c1d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_5.trace @@ -0,0 +1 @@ +9679823460697032654 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Addition/Level_6.ilean new file mode 100644 index 0000000..d1d3fc5 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat":{"usages":[[40,13,40,14]],"definition":null},"c:AdditionWorld.add_comm":{"usages":[[42,6,42,14]],"definition":null},"c:AdditionWorld.add_assoc":{"usages":[[41,6,41,15],[43,7,43,16]],"definition":null}},"module":"NNG.Levels.Addition.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_6.olean b/server/nng/build/lib/NNG/Levels/Addition/Level_6.olean new file mode 100644 index 0000000..d015a75 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Addition/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Addition/Level_6.trace b/server/nng/build/lib/NNG/Levels/Addition/Level_6.trace new file mode 100644 index 0000000..13460c6 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Addition/Level_6.trace @@ -0,0 +1 @@ +17709657049698654137 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition.ilean new file mode 100644 index 0000000..0b6e7cd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvAddition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition.olean b/server/nng/build/lib/NNG/Levels/AdvAddition.olean new file mode 100644 index 0000000..ac8c8d7 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition.trace b/server/nng/build/lib/NNG/Levels/AdvAddition.trace new file mode 100644 index 0000000..9116234 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition.trace @@ -0,0 +1 @@ +7852774950450280612 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.ilean new file mode 100644 index 0000000..e9fa163 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:not_false_iff":{"usages":[[17,75,17,88]],"definition":null},"c:ne_eq":{"usages":[[17,68,17,73]],"definition":null},"c:imp_self":{"usages":[[15,88,15,96]],"definition":null},"c:MyNat.zero_ne_succ":{"usages":[],"definition":[17,8,17,26]},"c:MyNat.zero":{"usages":[[17,37,17,41]],"definition":null},"c:MyNat.succ_inj":{"usages":[[22,10,22,18]],"definition":[15,8,15,22]},"c:MyNat.succ.injEq":{"usages":[[15,76,15,86]],"definition":null},"c:MyNat.succ":{"usages":[[15,35,15,39],[15,44,15,48],[17,44,17,48],[21,20,21,24],[21,29,21,33]],"definition":null},"c:MyNat":{"usages":[[15,30,15,31],[17,32,17,33],[21,11,21,12]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.olean new file mode 100644 index 0000000..d9d3960 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.trace new file mode 100644 index 0000000..d0094f7 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_1.trace @@ -0,0 +1 @@ +9336372057508599589 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.ilean new file mode 100644 index 0000000..2423540 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_10"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.olean new file mode 100644 index 0000000..8352980 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.trace new file mode 100644 index 0000000..ed3ffc8 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_10.trace @@ -0,0 +1 @@ +4008453200266032081 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.ilean new file mode 100644 index 0000000..6759c40 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_11"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.olean new file mode 100644 index 0000000..502eea0 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.trace new file mode 100644 index 0000000..5b253cc --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_11.trace @@ -0,0 +1 @@ +10015610238961501552 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.ilean new file mode 100644 index 0000000..b770a6c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_12"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.olean new file mode 100644 index 0000000..ae2e8a3 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.trace new file mode 100644 index 0000000..15d3040 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_12.trace @@ -0,0 +1 @@ +5389173862524826914 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.ilean new file mode 100644 index 0000000..cd9ce1e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_13"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.olean new file mode 100644 index 0000000..3204313 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.trace new file mode 100644 index 0000000..3535774 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_13.trace @@ -0,0 +1 @@ +185528048873600791 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.ilean new file mode 100644 index 0000000..138951c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.olean new file mode 100644 index 0000000..faa18fe Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.trace new file mode 100644 index 0000000..dfa5b14 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_2.trace @@ -0,0 +1 @@ +3507750203879559481 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.ilean new file mode 100644 index 0000000..3e7a817 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.olean new file mode 100644 index 0000000..6b13a3a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.trace new file mode 100644 index 0000000..410d78c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_3.trace @@ -0,0 +1 @@ +18314890376638277065 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.ilean new file mode 100644 index 0000000..e2bbb14 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.olean new file mode 100644 index 0000000..48d1e85 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.trace new file mode 100644 index 0000000..16e6312 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_4.trace @@ -0,0 +1 @@ +2092365143561121648 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.ilean new file mode 100644 index 0000000..3ab7757 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.olean new file mode 100644 index 0000000..7df7752 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.trace new file mode 100644 index 0000000..ff557f6 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_5.trace @@ -0,0 +1 @@ +17123810049702200014 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.ilean new file mode 100644 index 0000000..083387d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.olean new file mode 100644 index 0000000..76fa3ba Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.trace new file mode 100644 index 0000000..b56da14 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_6.trace @@ -0,0 +1 @@ +9314509491732931710 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.ilean new file mode 100644 index 0000000..8abd9ea --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.olean new file mode 100644 index 0000000..c71b2ad Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.trace new file mode 100644 index 0000000..2d90327 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_7.trace @@ -0,0 +1 @@ +13172030794097753806 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.ilean new file mode 100644 index 0000000..2b8dbbd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.olean new file mode 100644 index 0000000..7130733 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.trace new file mode 100644 index 0000000..c4f1af7 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_8.trace @@ -0,0 +1 @@ +10314181165617171139 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.ilean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.ilean new file mode 100644 index 0000000..19ae684 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvAddition.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.olean b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.olean new file mode 100644 index 0000000..4041be7 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.trace b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.trace new file mode 100644 index 0000000..e3e3b96 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvAddition/Level_9.trace @@ -0,0 +1 @@ +8205318715931175597 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication.ilean b/server/nng/build/lib/NNG/Levels/AdvMultiplication.ilean new file mode 100644 index 0000000..34737bf --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvMultiplication"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication.olean b/server/nng/build/lib/NNG/Levels/AdvMultiplication.olean new file mode 100644 index 0000000..28f757e Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvMultiplication.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication.trace b/server/nng/build/lib/NNG/Levels/AdvMultiplication.trace new file mode 100644 index 0000000..c00fc7d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication.trace @@ -0,0 +1 @@ +5627580921265871323 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.ilean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.ilean new file mode 100644 index 0000000..91a3c8b --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvMultiplication.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.olean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.olean new file mode 100644 index 0000000..73a306d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.trace b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.trace new file mode 100644 index 0000000..fcd4fe6 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_1.trace @@ -0,0 +1 @@ +5496292641504121726 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.ilean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.ilean new file mode 100644 index 0000000..fc7bd0e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvMultiplication.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.olean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.olean new file mode 100644 index 0000000..51c66e3 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.trace b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.trace new file mode 100644 index 0000000..b982607 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_2.trace @@ -0,0 +1 @@ +3065456568864785697 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.ilean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.ilean new file mode 100644 index 0000000..da0b92f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvMultiplication.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.olean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.olean new file mode 100644 index 0000000..ba6e67b Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.trace b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.trace new file mode 100644 index 0000000..63f9ad3 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_3.trace @@ -0,0 +1 @@ +11074674160667156308 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.ilean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.ilean new file mode 100644 index 0000000..2e66b7c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.AdvMultiplication.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.olean b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.olean new file mode 100644 index 0000000..6d38b1f Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.trace b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.trace new file mode 100644 index 0000000..428ebc8 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvMultiplication/Level_4.trace @@ -0,0 +1 @@ +5171635906789131558 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition.ilean new file mode 100644 index 0000000..218a4e3 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition.olean b/server/nng/build/lib/NNG/Levels/AdvProposition.olean new file mode 100644 index 0000000..16b6620 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition.trace b/server/nng/build/lib/NNG/Levels/AdvProposition.trace new file mode 100644 index 0000000..4e9a102 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition.trace @@ -0,0 +1 @@ +9478676650839776721 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.ilean new file mode 100644 index 0000000..2d12035 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.olean new file mode 100644 index 0000000..1b11931 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.trace new file mode 100644 index 0000000..1fa48a1 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_1.trace @@ -0,0 +1 @@ +13140666477521992594 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.ilean new file mode 100644 index 0000000..16fdfad --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_10"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.olean new file mode 100644 index 0000000..32789a4 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.trace new file mode 100644 index 0000000..790c7bd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_10.trace @@ -0,0 +1 @@ +18203712100298108367 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.ilean new file mode 100644 index 0000000..4c29d19 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Lean.Meta.tactic.hygienic":{"usages":[[16,11,16,26]],"definition":null}},"module":"NNG.Levels.AdvProposition.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.olean new file mode 100644 index 0000000..657c7f1 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.trace new file mode 100644 index 0000000..f2787fb --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_2.trace @@ -0,0 +1 @@ +10022829939796104452 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.ilean new file mode 100644 index 0000000..1a8ae67 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.olean new file mode 100644 index 0000000..8f33a29 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.trace new file mode 100644 index 0000000..9e0f004 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_3.trace @@ -0,0 +1 @@ +1967301918816512059 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.ilean new file mode 100644 index 0000000..e3a22a9 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.olean new file mode 100644 index 0000000..ce5a396 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.trace new file mode 100644 index 0000000..c2fe35c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_4.trace @@ -0,0 +1 @@ +16129653996493781623 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.ilean new file mode 100644 index 0000000..d75a82f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Iff.mpr":{"usages":[[26,12,26,13],[27,12,27,13]],"definition":null},"c:Iff.mp":{"usages":[[22,12,22,13],[23,12,23,13]],"definition":null}},"module":"NNG.Levels.AdvProposition.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.olean new file mode 100644 index 0000000..22b092d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.trace new file mode 100644 index 0000000..30bf614 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_5.trace @@ -0,0 +1 @@ +16436512257645906503 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.ilean new file mode 100644 index 0000000..d905ba0 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.olean new file mode 100644 index 0000000..44ef4c6 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.trace new file mode 100644 index 0000000..bf05509 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_6.trace @@ -0,0 +1 @@ +14208111587323885963 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.ilean new file mode 100644 index 0000000..a96a651 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.olean new file mode 100644 index 0000000..6ab7bd5 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.trace new file mode 100644 index 0000000..807ca0c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_7.trace @@ -0,0 +1 @@ +8730344058151551457 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.ilean new file mode 100644 index 0000000..643b03f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.olean new file mode 100644 index 0000000..4e1c038 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.trace new file mode 100644 index 0000000..074308d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_8.trace @@ -0,0 +1 @@ +14257091850430971994 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.ilean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.ilean new file mode 100644 index 0000000..698cf65 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.AdvProposition.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.olean b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.olean new file mode 100644 index 0000000..59eba58 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.trace b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.trace new file mode 100644 index 0000000..34aee37 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/AdvProposition/Level_9.trace @@ -0,0 +1 @@ +14967413771991349992 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function.ilean b/server/nng/build/lib/NNG/Levels/Function.ilean new file mode 100644 index 0000000..a133d3d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function.olean b/server/nng/build/lib/NNG/Levels/Function.olean new file mode 100644 index 0000000..c10f466 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function.trace b/server/nng/build/lib/NNG/Levels/Function.trace new file mode 100644 index 0000000..a011cea --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function.trace @@ -0,0 +1 @@ +4955068752717367929 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_1.ilean new file mode 100644 index 0000000..7fc2359 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_1.olean b/server/nng/build/lib/NNG/Levels/Function/Level_1.olean new file mode 100644 index 0000000..217974c Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_1.trace b/server/nng/build/lib/NNG/Levels/Function/Level_1.trace new file mode 100644 index 0000000..3648ee3 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_1.trace @@ -0,0 +1 @@ +11635906400192042058 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_2.ilean new file mode 100644 index 0000000..ec4a0b4 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat":{"usages":[[18,6,18,7],[18,10,18,11]],"definition":null}},"module":"NNG.Levels.Function.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_2.olean b/server/nng/build/lib/NNG/Levels/Function/Level_2.olean new file mode 100644 index 0000000..b1d64b0 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_2.trace b/server/nng/build/lib/NNG/Levels/Function/Level_2.trace new file mode 100644 index 0000000..2f74304 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_2.trace @@ -0,0 +1 @@ +5739902419023245944 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_3.ilean new file mode 100644 index 0000000..b66fa84 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_3.olean b/server/nng/build/lib/NNG/Levels/Function/Level_3.olean new file mode 100644 index 0000000..e983b55 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_3.trace b/server/nng/build/lib/NNG/Levels/Function/Level_3.trace new file mode 100644 index 0000000..3765006 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_3.trace @@ -0,0 +1 @@ +13295869598671621401 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_4.ilean new file mode 100644 index 0000000..77fbcf0 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_4.olean b/server/nng/build/lib/NNG/Levels/Function/Level_4.olean new file mode 100644 index 0000000..15bb087 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_4.trace b/server/nng/build/lib/NNG/Levels/Function/Level_4.trace new file mode 100644 index 0000000..f73245d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_4.trace @@ -0,0 +1 @@ +2060723493075565450 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_5.ilean new file mode 100644 index 0000000..d2a8ae7 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_5.olean b/server/nng/build/lib/NNG/Levels/Function/Level_5.olean new file mode 100644 index 0000000..7650835 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_5.trace b/server/nng/build/lib/NNG/Levels/Function/Level_5.trace new file mode 100644 index 0000000..348e271 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_5.trace @@ -0,0 +1 @@ +33560334747064612 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_6.ilean new file mode 100644 index 0000000..f7560be --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_6.olean b/server/nng/build/lib/NNG/Levels/Function/Level_6.olean new file mode 100644 index 0000000..e5f7236 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_6.trace b/server/nng/build/lib/NNG/Levels/Function/Level_6.trace new file mode 100644 index 0000000..4fcc927 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_6.trace @@ -0,0 +1 @@ +11236535691868165392 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_7.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_7.ilean new file mode 100644 index 0000000..90b502f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_7.olean b/server/nng/build/lib/NNG/Levels/Function/Level_7.olean new file mode 100644 index 0000000..e6462ba Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_7.trace b/server/nng/build/lib/NNG/Levels/Function/Level_7.trace new file mode 100644 index 0000000..81404ca --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_7.trace @@ -0,0 +1 @@ +13833688845280623014 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_8.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_8.ilean new file mode 100644 index 0000000..cd7e338 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Empty":{"usages":[[17,35,17,40],[17,49,17,54]],"definition":null}},"module":"NNG.Levels.Function.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_8.olean b/server/nng/build/lib/NNG/Levels/Function/Level_8.olean new file mode 100644 index 0000000..c7c1107 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_8.trace b/server/nng/build/lib/NNG/Levels/Function/Level_8.trace new file mode 100644 index 0000000..247b254 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_8.trace @@ -0,0 +1 @@ +3072509448285891874 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_9.ilean b/server/nng/build/lib/NNG/Levels/Function/Level_9.ilean new file mode 100644 index 0000000..d096b16 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Function.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_9.olean b/server/nng/build/lib/NNG/Levels/Function/Level_9.olean new file mode 100644 index 0000000..054b056 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Function/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Function/Level_9.trace b/server/nng/build/lib/NNG/Levels/Function/Level_9.trace new file mode 100644 index 0000000..a7ade54 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Function/Level_9.trace @@ -0,0 +1 @@ +11794545348629460374 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality.ilean b/server/nng/build/lib/NNG/Levels/Inequality.ilean new file mode 100644 index 0000000..7d57769 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Inequality"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality.olean b/server/nng/build/lib/NNG/Levels/Inequality.olean new file mode 100644 index 0000000..704725d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality.trace b/server/nng/build/lib/NNG/Levels/Inequality.trace new file mode 100644 index 0000000..55184cc --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality.trace @@ -0,0 +1 @@ +9336489098668184658 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.ilean new file mode 100644 index 0000000..6733e24 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_1.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.olean new file mode 100644 index 0000000..6badbc8 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_1.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.trace new file mode 100644 index 0000000..b5ffa38 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_1.trace @@ -0,0 +1 @@ +15715418939533793162 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_10.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.ilean new file mode 100644 index 0000000..a65afd3 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_10"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_10.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.olean new file mode 100644 index 0000000..aa538d8 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_10.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.trace new file mode 100644 index 0000000..eb78d47 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_10.trace @@ -0,0 +1 @@ +8366872987603129236 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_11.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.ilean new file mode 100644 index 0000000..2c2b577 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_11"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_11.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.olean new file mode 100644 index 0000000..8357122 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_11.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.trace new file mode 100644 index 0000000..3e01f72 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_11.trace @@ -0,0 +1 @@ +9104254495681588724 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_12.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.ilean new file mode 100644 index 0000000..9dbe64f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_12"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_12.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.olean new file mode 100644 index 0000000..6fd62b4 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_12.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.trace new file mode 100644 index 0000000..5115864 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_12.trace @@ -0,0 +1 @@ +14766865931000247685 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_13.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.ilean new file mode 100644 index 0000000..1329add --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_13"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_13.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.olean new file mode 100644 index 0000000..82cc6dc Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_13.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.trace new file mode 100644 index 0000000..e9d270e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_13.trace @@ -0,0 +1 @@ +7236720961247687624 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_14.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.ilean new file mode 100644 index 0000000..cefc752 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_14"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_14.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.olean new file mode 100644 index 0000000..d6f3626 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_14.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.trace new file mode 100644 index 0000000..e65fa47 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_14.trace @@ -0,0 +1 @@ +17080990698887132932 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_15.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.ilean new file mode 100644 index 0000000..5788bbd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_15"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_15.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.olean new file mode 100644 index 0000000..518eea1 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_15.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.trace new file mode 100644 index 0000000..9a7cd4e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_15.trace @@ -0,0 +1 @@ +15808132813580510808 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_16.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.ilean new file mode 100644 index 0000000..8264748 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_16"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_16.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.olean new file mode 100644 index 0000000..f43231b Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_16.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.trace new file mode 100644 index 0000000..65a9805 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_16.trace @@ -0,0 +1 @@ +7637579646193566177 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_17.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.ilean new file mode 100644 index 0000000..be9c88d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_17"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_17.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.olean new file mode 100644 index 0000000..16d71a7 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_17.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.trace new file mode 100644 index 0000000..1983d9c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_17.trace @@ -0,0 +1 @@ +14135338231934509378 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.ilean new file mode 100644 index 0000000..1e875fe --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_2.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.olean new file mode 100644 index 0000000..bacec49 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_2.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.trace new file mode 100644 index 0000000..6ada09d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_2.trace @@ -0,0 +1 @@ +10180719735176429031 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.ilean new file mode 100644 index 0000000..688fd92 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_3.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.olean new file mode 100644 index 0000000..79d9320 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_3.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.trace new file mode 100644 index 0000000..3e40b0c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_3.trace @@ -0,0 +1 @@ +10425666160152371884 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.ilean new file mode 100644 index 0000000..d4a0bc6 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_4.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.olean new file mode 100644 index 0000000..fe9725a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_4.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.trace new file mode 100644 index 0000000..8aeaca9 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_4.trace @@ -0,0 +1 @@ +5262542741621948205 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.ilean new file mode 100644 index 0000000..1962e78 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_5.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.olean new file mode 100644 index 0000000..1c31a9a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_5.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.trace new file mode 100644 index 0000000..e6f0c73 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_5.trace @@ -0,0 +1 @@ +10099871401285119100 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.ilean new file mode 100644 index 0000000..858767a --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_6.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.olean new file mode 100644 index 0000000..3b628f6 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_6.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.trace new file mode 100644 index 0000000..02ff8cd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_6.trace @@ -0,0 +1 @@ +18291074078086778850 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_7.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.ilean new file mode 100644 index 0000000..1f9ea1c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_7.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.olean new file mode 100644 index 0000000..500f5f8 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_7.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.trace new file mode 100644 index 0000000..ea65ccd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_7.trace @@ -0,0 +1 @@ +4948452312372643925 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_8.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.ilean new file mode 100644 index 0000000..e8cb103 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_8.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.olean new file mode 100644 index 0000000..65571b5 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_8.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.trace new file mode 100644 index 0000000..4675054 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_8.trace @@ -0,0 +1 @@ +8910944482383625099 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_9.ilean b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.ilean new file mode 100644 index 0000000..19f48cc --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Inequality.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_9.olean b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.olean new file mode 100644 index 0000000..8578e0f Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Inequality/Level_9.trace b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.trace new file mode 100644 index 0000000..3ed8de7 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Inequality/Level_9.trace @@ -0,0 +1 @@ +10084756629938233881 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication.ilean b/server/nng/build/lib/NNG/Levels/Multiplication.ilean new file mode 100644 index 0000000..1d9f701 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Multiplication"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication.olean b/server/nng/build/lib/NNG/Levels/Multiplication.olean new file mode 100644 index 0000000..f4be59d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication.trace b/server/nng/build/lib/NNG/Levels/Multiplication.trace new file mode 100644 index 0000000..aa0fcb8 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication.trace @@ -0,0 +1 @@ +15100919068659915784 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.ilean new file mode 100644 index 0000000..8509594 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.olean new file mode 100644 index 0000000..12d08c4 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.trace new file mode 100644 index 0000000..3ceaf84 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_1.trace @@ -0,0 +1 @@ +2681194911731925232 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.ilean new file mode 100644 index 0000000..c47bad5 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.olean new file mode 100644 index 0000000..fb5224b Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.trace new file mode 100644 index 0000000..51a6198 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_2.trace @@ -0,0 +1 @@ +10245843345607907477 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.ilean new file mode 100644 index 0000000..787ddb4 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.olean new file mode 100644 index 0000000..40da5f1 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.trace new file mode 100644 index 0000000..35f0e4e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_3.trace @@ -0,0 +1 @@ +8940547588455067611 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.ilean new file mode 100644 index 0000000..902b66c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.olean new file mode 100644 index 0000000..b141353 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.trace new file mode 100644 index 0000000..a872f1f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_4.trace @@ -0,0 +1 @@ +14993641720182264605 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.ilean new file mode 100644 index 0000000..2051584 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.olean new file mode 100644 index 0000000..3a06142 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.trace new file mode 100644 index 0000000..8105ffd --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_5.trace @@ -0,0 +1 @@ +18175551488241716216 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.ilean new file mode 100644 index 0000000..f75a308 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.olean new file mode 100644 index 0000000..a6ed629 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.trace new file mode 100644 index 0000000..2a12214 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_6.trace @@ -0,0 +1 @@ +14531862140867195758 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.ilean new file mode 100644 index 0000000..357d170 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.olean new file mode 100644 index 0000000..99fc155 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.trace new file mode 100644 index 0000000..ffc70ae --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_7.trace @@ -0,0 +1 @@ +15474257035701176495 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.ilean new file mode 100644 index 0000000..a86942d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.olean new file mode 100644 index 0000000..4e1b545 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.trace new file mode 100644 index 0000000..5757f7c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_8.trace @@ -0,0 +1 @@ +3648854208530401287 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.ilean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.ilean new file mode 100644 index 0000000..954badf --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Multiplication.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.olean b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.olean new file mode 100644 index 0000000..2c95e7b Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.trace b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.trace new file mode 100644 index 0000000..2b1f5bf --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Multiplication/Level_9.trace @@ -0,0 +1 @@ +4975536308483488989 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power.ilean b/server/nng/build/lib/NNG/Levels/Power.ilean new file mode 100644 index 0000000..91694c3 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Power"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power.olean b/server/nng/build/lib/NNG/Levels/Power.olean new file mode 100644 index 0000000..4466be0 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power.trace b/server/nng/build/lib/NNG/Levels/Power.trace new file mode 100644 index 0000000..30f497d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power.trace @@ -0,0 +1 @@ +12255441869344750286 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_1.ilean new file mode 100644 index 0000000..2650824 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_1.olean b/server/nng/build/lib/NNG/Levels/Power/Level_1.olean new file mode 100644 index 0000000..d073b53 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_1.trace b/server/nng/build/lib/NNG/Levels/Power/Level_1.trace new file mode 100644 index 0000000..1d06499 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_1.trace @@ -0,0 +1 @@ +3557218418934706832 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_2.ilean new file mode 100644 index 0000000..f40d21b --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_2.olean b/server/nng/build/lib/NNG/Levels/Power/Level_2.olean new file mode 100644 index 0000000..134d957 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_2.trace b/server/nng/build/lib/NNG/Levels/Power/Level_2.trace new file mode 100644 index 0000000..f8ba540 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_2.trace @@ -0,0 +1 @@ +3161955687484215514 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_3.ilean new file mode 100644 index 0000000..0f08359 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_3.olean b/server/nng/build/lib/NNG/Levels/Power/Level_3.olean new file mode 100644 index 0000000..5e6b126 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_3.trace b/server/nng/build/lib/NNG/Levels/Power/Level_3.trace new file mode 100644 index 0000000..e72a579 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_3.trace @@ -0,0 +1 @@ +13739636179189224786 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_4.ilean new file mode 100644 index 0000000..e15a998 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_4.olean b/server/nng/build/lib/NNG/Levels/Power/Level_4.olean new file mode 100644 index 0000000..b949d5a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_4.trace b/server/nng/build/lib/NNG/Levels/Power/Level_4.trace new file mode 100644 index 0000000..9672833 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_4.trace @@ -0,0 +1 @@ +2643256504804179665 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_5.ilean new file mode 100644 index 0000000..58da64c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_5.olean b/server/nng/build/lib/NNG/Levels/Power/Level_5.olean new file mode 100644 index 0000000..fc8d506 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_5.trace b/server/nng/build/lib/NNG/Levels/Power/Level_5.trace new file mode 100644 index 0000000..b91249f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_5.trace @@ -0,0 +1 @@ +14401556251889401930 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_6.ilean new file mode 100644 index 0000000..7068f22 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_6.olean b/server/nng/build/lib/NNG/Levels/Power/Level_6.olean new file mode 100644 index 0000000..7e1e06d Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_6.trace b/server/nng/build/lib/NNG/Levels/Power/Level_6.trace new file mode 100644 index 0000000..83f1ba1 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_6.trace @@ -0,0 +1 @@ +16899530818829903575 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_7.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_7.ilean new file mode 100644 index 0000000..1fff0b5 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_7.olean b/server/nng/build/lib/NNG/Levels/Power/Level_7.olean new file mode 100644 index 0000000..851bccd Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_7.trace b/server/nng/build/lib/NNG/Levels/Power/Level_7.trace new file mode 100644 index 0000000..36ca048 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_7.trace @@ -0,0 +1 @@ +8728766979918631633 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_8.ilean b/server/nng/build/lib/NNG/Levels/Power/Level_8.ilean new file mode 100644 index 0000000..ed85ad4 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:Bool.true":{"usages":[[17,6,17,10]],"definition":null}},"module":"NNG.Levels.Power.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_8.olean b/server/nng/build/lib/NNG/Levels/Power/Level_8.olean new file mode 100644 index 0000000..a71ecab Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Power/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Power/Level_8.trace b/server/nng/build/lib/NNG/Levels/Power/Level_8.trace new file mode 100644 index 0000000..83efa59 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Power/Level_8.trace @@ -0,0 +1 @@ +16000363894567288792 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition.ilean b/server/nng/build/lib/NNG/Levels/Proposition.ilean new file mode 100644 index 0000000..8f9853c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition.olean b/server/nng/build/lib/NNG/Levels/Proposition.olean new file mode 100644 index 0000000..44b16fc Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition.trace b/server/nng/build/lib/NNG/Levels/Proposition.trace new file mode 100644 index 0000000..91cc1cc --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition.trace @@ -0,0 +1 @@ +8034725322126254406 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.ilean new file mode 100644 index 0000000..f64af94 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_1.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.olean new file mode 100644 index 0000000..26fc6ba Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_1.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.trace new file mode 100644 index 0000000..71d00c7 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_1.trace @@ -0,0 +1 @@ +18179347340463669579 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.ilean new file mode 100644 index 0000000..1585563 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_2.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.olean new file mode 100644 index 0000000..8ceb1c0 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_2.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.trace new file mode 100644 index 0000000..9622df1 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_2.trace @@ -0,0 +1 @@ +13217430201083326791 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.ilean new file mode 100644 index 0000000..dafe381 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_3.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.olean new file mode 100644 index 0000000..8f92154 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_3.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.trace new file mode 100644 index 0000000..32f55cb --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_3.trace @@ -0,0 +1 @@ +5299063203734346172 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.ilean new file mode 100644 index 0000000..cfdd964 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_4.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.olean new file mode 100644 index 0000000..7a1ff56 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_4.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.trace new file mode 100644 index 0000000..619fbad --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_4.trace @@ -0,0 +1 @@ +7415905544244480042 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_5.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.ilean new file mode 100644 index 0000000..37f90ac --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_5"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_5.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.olean new file mode 100644 index 0000000..f55c1b6 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_5.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.trace new file mode 100644 index 0000000..067710f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_5.trace @@ -0,0 +1 @@ +10613228186954229021 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_6.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.ilean new file mode 100644 index 0000000..4111256 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_6"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_6.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.olean new file mode 100644 index 0000000..6b83bc4 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_6.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.trace new file mode 100644 index 0000000..a0c149e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_6.trace @@ -0,0 +1 @@ +7894357058058824740 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_7.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.ilean new file mode 100644 index 0000000..b80426e --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_7"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_7.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.olean new file mode 100644 index 0000000..3de6399 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_7.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.trace new file mode 100644 index 0000000..f619780 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_7.trace @@ -0,0 +1 @@ +16656846323211551510 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_8.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.ilean new file mode 100644 index 0000000..ae70d0f --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:not_iff_imp_false":{"usages":[[20,6,20,23],[21,6,21,23]],"definition":null}},"module":"NNG.Levels.Proposition.Level_8"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_8.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.olean new file mode 100644 index 0000000..67b2caa Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_8.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.trace new file mode 100644 index 0000000..ba8e72d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_8.trace @@ -0,0 +1 @@ +13601220282574937828 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_9.ilean b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.ilean new file mode 100644 index 0000000..f912ff4 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Proposition.Level_9"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_9.olean b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.olean new file mode 100644 index 0000000..f50411a Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Proposition/Level_9.trace b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.trace new file mode 100644 index 0000000..4a5bc97 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Proposition/Level_9.trace @@ -0,0 +1 @@ +15399361750882572321 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial.ilean b/server/nng/build/lib/NNG/Levels/Tutorial.ilean new file mode 100644 index 0000000..ad2b129 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Levels.Tutorial"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial.olean b/server/nng/build/lib/NNG/Levels/Tutorial.olean new file mode 100644 index 0000000..d8fae45 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Tutorial.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Tutorial.trace b/server/nng/build/lib/NNG/Levels/Tutorial.trace new file mode 100644 index 0000000..f666963 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial.trace @@ -0,0 +1 @@ +1595615440839641244 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.ilean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.ilean new file mode 100644 index 0000000..7eb784c --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat":{"usages":[[26,13,26,14]],"definition":null}},"module":"NNG.Levels.Tutorial.Level_1"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.olean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.olean new file mode 100644 index 0000000..d4067b6 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.trace b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.trace new file mode 100644 index 0000000..029fdab --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_1.trace @@ -0,0 +1 @@ +17057151196775041350 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.ilean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.ilean new file mode 100644 index 0000000..1f2e7eb --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat":{"usages":[[24,11,24,12]],"definition":null}},"module":"NNG.Levels.Tutorial.Level_2"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.olean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.olean new file mode 100644 index 0000000..713786b Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.trace b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.trace new file mode 100644 index 0000000..f0c7b10 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_2.trace @@ -0,0 +1 @@ +2087975388406110178 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.ilean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.ilean new file mode 100644 index 0000000..7a02609 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.succ":{"usages":[[47,20,47,24],[47,35,47,39],[47,41,47,45],[47,51,47,55]],"definition":null},"c:MyNat":{"usages":[[47,11,47,12]],"definition":null}},"module":"NNG.Levels.Tutorial.Level_3"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.olean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.olean new file mode 100644 index 0000000..1d7fadb Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.trace b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.trace new file mode 100644 index 0000000..4568320 --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_3.trace @@ -0,0 +1 @@ +2143617200443064964 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.ilean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.ilean new file mode 100644 index 0000000..cb2073d --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.succ":{"usages":[[45,18,45,22],[45,27,45,31]],"definition":null},"c:MyNat.add_zero":{"usages":[[52,11,52,19]],"definition":null},"c:MyNat.add_succ":{"usages":[[49,11,49,19]],"definition":null},"c:MyNat":{"usages":[[45,9,45,10]],"definition":null}},"module":"NNG.Levels.Tutorial.Level_4"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.olean b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.olean new file mode 100644 index 0000000..a179d63 Binary files /dev/null and b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.olean differ diff --git a/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.trace b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.trace new file mode 100644 index 0000000..03fc4ca --- /dev/null +++ b/server/nng/build/lib/NNG/Levels/Tutorial/Level_4.trace @@ -0,0 +1 @@ +7407492338022565581 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Metadata.ilean b/server/nng/build/lib/NNG/Metadata.ilean new file mode 100644 index 0000000..36ba107 --- /dev/null +++ b/server/nng/build/lib/NNG/Metadata.ilean @@ -0,0 +1 @@ +{"version":1,"references":{},"module":"NNG.Metadata"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Metadata.olean b/server/nng/build/lib/NNG/Metadata.olean new file mode 100644 index 0000000..cf8ed32 Binary files /dev/null and b/server/nng/build/lib/NNG/Metadata.olean differ diff --git a/server/nng/build/lib/NNG/Metadata.trace b/server/nng/build/lib/NNG/Metadata.trace new file mode 100644 index 0000000..0a81af6 --- /dev/null +++ b/server/nng/build/lib/NNG/Metadata.trace @@ -0,0 +1 @@ +10126315224814379241 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Modifications/Tactics.ilean b/server/nng/build/lib/NNG/Modifications/Tactics.ilean new file mode 100644 index 0000000..68608ba --- /dev/null +++ b/server/nng/build/lib/NNG/Modifications/Tactics.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:liftM":{"usages":[[65,12,65,17]],"definition":null},"c:_private.Lean.Elab.Tactic.Induction.0.Lean.Elab.Tactic.getElimNameInfo":{"usages":[[71,13,71,28]],"definition":null},"c:_private.Lean.Elab.Tactic.Induction.0.Lean.Elab.Tactic.generalizeVars":{"usages":[[71,47,71,61]],"definition":null},"c:_private.Lean.Elab.Tactic.Induction.0.Lean.Elab.Tactic.generalizeTargets":{"usages":[[71,29,71,46]],"definition":null},"c:_private.Lean.Elab.Tactic.Induction.0.Lean.Elab.Tactic.ElimApp.getAltNumFields":{"usages":[[52,13,52,28],[59,20,59,35]],"definition":null},"c:Unit.unit":{"usages":[[63,61,63,63]],"definition":null},"c:Pure.pure":{"usages":[[63,56,63,60],[69,2,69,6],[124,64,124,68]],"definition":null},"c:Option.some":{"usages":[[63,8,63,12]],"definition":null},"c:MyNat.zero":{"usages":[[42,4,42,8]],"definition":null},"c:MyNat.succ":{"usages":[[40,40,40,44],[43,4,43,8]],"definition":null},"c:MyNat.rfl":{"usages":[[123,9,123,18]],"definition":[121,16,121,19]},"c:MyNat.rewriteSeq":{"usages":[[21,9,21,25]],"definition":[19,16,19,26]},"c:MyNat.rec'":{"usages":[],"definition":[39,4,39,8]},"c:MyNat.induction":{"usages":[],"definition":[80,14,80,36]},"c:MyNat.evalRfl":{"usages":[],"definition":[123,24,123,31]},"c:MyNat.evalRewriteSeq":{"usages":[],"definition":[21,31,21,45]},"c:MyNat":{"usages":[[39,14,39,15],[40,17,40,18],[40,54,40,55]],"definition":null},"c:List.splitAtD":{"usages":[[60,39,60,47]],"definition":null},"c:List.map":{"usages":[[62,55,62,58]],"definition":null},"c:List":{"usages":[[56,18,56,22]],"definition":null},"c:Lean.withRef":{"usages":[[94,19,94,26]],"definition":null},"c:Lean.binderIdent":{"usages":[[81,30,81,41]],"definition":null},"c:Lean.Unhygienic.run":{"usages":[[60,59,60,73]],"definition":null},"c:Lean.TSyntax.raw":{"usages":[[83,38,83,39]],"definition":null},"c:Lean.Syntax.getSepArgs":{"usages":[[83,40,83,50]],"definition":null},"c:Lean.Syntax.getArgs":{"usages":[[56,44,56,51]],"definition":null},"c:Lean.Syntax":{"usages":[[53,82,53,88],[56,23,56,29]],"definition":null},"c:Lean.RBTree.toArray":{"usages":[[93,51,93,58]],"definition":null},"c:Lean.Parser.checkColGt":{"usages":[[81,24,81,29]],"definition":null},"c:Lean.Parser.Tactic.rwRuleSeq":{"usages":[[19,43,19,52]],"definition":null},"c:Lean.Parser.Tactic.location":{"usages":[[19,54,19,62]],"definition":null},"c:Lean.Parser.Tactic.config":{"usages":[[19,34,19,40]],"definition":null},"c:Lean.Parser.Tactic.casesTarget":{"usages":[[80,57,80,68]],"definition":null},"c:Lean.Parser.Tactic.ElimApp.evalNames":{"usages":[[98,21,98,38]],"definition":[53,4,53,21]},"c:Lean.Parser.Category.tactic":{"usages":[[19,67,19,73],[82,6,82,12],[121,29,121,35]],"definition":null},"c:Lean.Meta.withReducible":{"usages":[[124,34,124,47]],"definition":null},"c:Lean.Meta.throwTacticEx":{"usages":[[28,7,28,20]],"definition":null},"c:Lean.Meta.sortFVarIds":{"usages":[[93,37,93,48]],"definition":null},"c:Lean.Meta.mkGeneralizationForbiddenSet":{"usages":[[91,22,91,50]],"definition":null},"c:Lean.Meta.getFVarSetToGeneralize":{"usages":[[92,18,92,40]],"definition":null},"c:Lean.Meta.getElimInfo":{"usages":[[86,19,86,30]],"definition":null},"c:Lean.Meta.addImplicitTargets":{"usages":[[87,18,87,36]],"definition":null},"c:Lean.Meta.FVarSubst.apply":{"usages":[[67,30,67,35]],"definition":null},"c:Lean.Meta.ElimInfo.motivePos":{"usages":[[96,47,96,56]],"definition":null},"c:Lean.Meta.ElimInfo":{"usages":[[53,34,53,42]],"definition":null},"c:Lean.Meta.Cases.unifyEqs?":{"usages":[[63,26,63,41]],"definition":null},"c:Lean.MVarId.withContext":{"usages":[[67,8,67,19],[85,4,85,15],[90,6,90,17]],"definition":null},"c:Lean.MVarId.tryClear":{"usages":[[65,38,65,46]],"definition":null},"c:Lean.MVarId.revert":{"usages":[[93,27,93,33]],"definition":null},"c:Lean.MVarId.refl":{"usages":[[124,58,124,62]],"definition":null},"c:Lean.MVarId.introNP":{"usages":[[64,19,64,26]],"definition":null},"c:Lean.MVarId.introN":{"usages":[[62,23,62,29]],"definition":null},"c:Lean.MVarId.getTag":{"usages":[[94,75,94,81]],"definition":null},"c:Lean.MVarId.assign":{"usages":[[97,8,97,14]],"definition":null},"c:Lean.MVarId":{"usages":[[55,21,55,27]],"definition":null},"c:Lean.FVarId":{"usages":[[54,57,54,63]],"definition":null},"c:Lean.Expr.mvarId!":{"usages":[[96,59,96,66]],"definition":null},"c:Lean.Expr.getAppArgs":{"usages":[[95,37,95,47]],"definition":null},"c:Lean.Expr.fvarId!":{"usages":[[89,40,89,47]],"definition":null},"c:Lean.Expr.fvar":{"usages":[[67,39,67,44]],"definition":null},"c:Lean.Expr.addLocalVarInfoForBinderIdent":{"usages":[[67,51,67,80]],"definition":null},"c:Lean.Elab.Term.TermElabM":{"usages":[[55,4,55,13]],"definition":null},"c:Lean.Elab.Tactic.withRWRulesSeq":{"usages":[[24,2,24,16]],"definition":null},"c:Lean.Elab.Tactic.withLocation":{"usages":[[25,4,25,16]],"definition":null},"c:Lean.Elab.Tactic.throwNoGoalsToBeSolved":{"usages":[[84,35,84,57]],"definition":null},"c:Lean.Elab.Tactic.setGoals":{"usages":[[100,6,100,14]],"definition":null},"c:Lean.Elab.Tactic.rewriteTarget":{"usages":[[27,7,27,20]],"definition":null},"c:Lean.Elab.Tactic.rewriteLocalDecl":{"usages":[[26,7,26,23]],"definition":null},"c:Lean.Elab.Tactic.liftMetaTactic":{"usages":[[124,2,124,16]],"definition":null},"c:Lean.Elab.Tactic.getUnsolvedGoals":{"usages":[[84,16,84,32]],"definition":null},"c:Lean.Elab.Tactic.getNameOfIdent'":{"usages":[[62,60,62,75]],"definition":null},"c:Lean.Elab.Tactic.expandOptLocation":{"usages":[[23,15,23,32]],"definition":null},"c:Lean.Elab.Tactic.evalInduction.checkTargets":{"usages":[[88,4,88,30]],"definition":null},"c:Lean.Elab.Tactic.evalInduction":{"usages":[[71,65,71,78]],"definition":null},"c:Lean.Elab.Tactic.evalCases":{"usages":[[52,32,52,41]],"definition":null},"c:Lean.Elab.Tactic.elabRewriteConfig":{"usages":[[22,12,22,29]],"definition":null},"c:Lean.Elab.Tactic.elabCasesTargets":{"usages":[[83,16,83,32]],"definition":null},"c:Lean.Elab.Tactic.Tactic":{"usages":[[21,48,21,54],[123,34,123,40]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.setMotiveArg":{"usages":[[96,6,96,26]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.mkElimApp":{"usages":[[94,35,94,52]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.evalAlts.go":{"usages":[[52,42,52,61]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Result.others":{"usages":[[100,38,100,44]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Result.elimApp":{"usages":[[95,29,95,36],[97,22,97,29]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Result.alts":{"usages":[[98,55,98,59]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Alt.name":{"usages":[[58,8,58,12]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Alt.mvarId":{"usages":[[58,25,58,31]],"definition":null},"c:Lean.Elab.Tactic.ElimApp.Alt":{"usages":[[53,58,53,69]],"definition":null},"c:Array.toList":{"usages":[[56,55,56,61],[100,46,100,52]],"definition":null},"c:Array.size":{"usages":[[99,35,99,39]],"definition":null},"c:Array.push":{"usages":[[68,25,68,29]],"definition":null},"c:Array.map":{"usages":[[89,33,89,36]],"definition":null},"c:Array.foldlM":{"usages":[[65,28,65,34]],"definition":null},"c:Array":{"usages":[[53,52,53,57],[54,51,54,56],[55,15,55,20]],"definition":null}},"module":"NNG.Modifications.Tactics"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/Modifications/Tactics.olean b/server/nng/build/lib/NNG/Modifications/Tactics.olean new file mode 100644 index 0000000..2ed7adb Binary files /dev/null and b/server/nng/build/lib/NNG/Modifications/Tactics.olean differ diff --git a/server/nng/build/lib/NNG/Modifications/Tactics.trace b/server/nng/build/lib/NNG/Modifications/Tactics.trace new file mode 100644 index 0000000..b8a6417 --- /dev/null +++ b/server/nng/build/lib/NNG/Modifications/Tactics.trace @@ -0,0 +1 @@ +14754082556322596060 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Addition.ilean b/server/nng/build/lib/NNG/MyNat/Addition.ilean new file mode 100644 index 0000000..871f7fa --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Addition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.zero":{"usages":[[7,7,7,8]],"definition":null},"c:MyNat.succ":{"usages":[[8,7,8,17],[8,23,8,33],[22,38,22,42],[22,48,22,52]],"definition":null},"c:MyNat.instAddMyNat":{"usages":[],"definition":[10,0,10,8]},"c:MyNat.add_zero":{"usages":[],"definition":[17,8,17,16]},"c:MyNat.add_succ":{"usages":[],"definition":[22,8,22,16]},"c:MyNat.add":{"usages":[[11,9,11,18]],"definition":[6,4,6,7]},"c:MyNat":{"usages":[[6,10,6,15],[6,18,6,23],[6,26,6,31],[10,15,10,20],[17,22,17,27],[22,24,22,29]],"definition":null},"c:Add.add":{"usages":[[11,2,11,5]],"definition":null},"c:Add":{"usages":[[10,11,10,14]],"definition":null}},"module":"NNG.MyNat.Addition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Addition.olean b/server/nng/build/lib/NNG/MyNat/Addition.olean new file mode 100644 index 0000000..8bd7dc5 Binary files /dev/null and b/server/nng/build/lib/NNG/MyNat/Addition.olean differ diff --git a/server/nng/build/lib/NNG/MyNat/Addition.trace b/server/nng/build/lib/NNG/MyNat/Addition.trace new file mode 100644 index 0000000..9a68d6e --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Addition.trace @@ -0,0 +1 @@ +2760095421866741095 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Definition.ilean b/server/nng/build/lib/NNG/MyNat/Definition.ilean new file mode 100644 index 0000000..5cfc12f --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Definition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:rfl":{"usages":[[34,38,34,41]],"definition":null},"c:ToString.toString":{"usages":[[32,2,32,10],[32,16,32,24]],"definition":null},"c:ToString":{"usages":[[31,11,31,19]],"definition":null},"c:OfNat.ofNat":{"usages":[[29,2,29,7]],"definition":null},"c:OfNat":{"usages":[[28,27,28,32]],"definition":null},"c:Nat.zero":{"usages":[[20,4,20,12],[25,20,25,28]],"definition":null},"c:Nat.succ":{"usages":[[21,4,21,12],[26,20,26,28]],"definition":null},"c:Nat":{"usages":[[18,22,18,25],[23,31,23,34],[28,20,28,23]],"definition":null},"c:MyNat.zero_eq_0":{"usages":[],"definition":[34,8,34,17]},"c:MyNat.zero":{"usages":[[16,13,16,23],[20,18,20,28],[25,4,25,14],[34,20,34,30]],"definition":[5,2,5,6]},"c:MyNat.succ":{"usages":[[21,18,21,28],[26,4,26,14],[36,19,36,29]],"definition":[6,2,6,6]},"c:MyNat.one":{"usages":[],"definition":[36,4,36,7]},"c:MyNat.ofNat":{"usages":[],"definition":[28,9,28,14]},"c:MyNat.natFromMyNat":{"usages":[[32,26,32,38]],"definition":[23,4,23,16]},"c:MyNat.myNatFromNat":{"usages":[[29,11,29,23]],"definition":[18,4,18,16]},"c:MyNat.instToStringMyNat":{"usages":[],"definition":[31,0,31,8]},"c:MyNat.instInhabitedMyNat":{"usages":[],"definition":[15,0,15,8]},"c:MyNat":{"usages":[[10,16,10,21],[15,21,15,26],[18,29,18,34],[23,22,23,27],[28,33,28,38],[31,20,31,25],[36,10,36,15]],"definition":[4,10,4,15]},"c:Inhabited.default":{"usages":[[16,2,16,9]],"definition":null},"c:Inhabited":{"usages":[[7,27,7,36],[15,11,15,20]],"definition":null},"c:DecidableEq":{"usages":[[7,14,7,25]],"definition":null},"c:BEq":{"usages":[[7,9,7,12]],"definition":null}},"module":"NNG.MyNat.Definition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Definition.olean b/server/nng/build/lib/NNG/MyNat/Definition.olean new file mode 100644 index 0000000..a7c648d Binary files /dev/null and b/server/nng/build/lib/NNG/MyNat/Definition.olean differ diff --git a/server/nng/build/lib/NNG/MyNat/Definition.trace b/server/nng/build/lib/NNG/MyNat/Definition.trace new file mode 100644 index 0000000..78e3290 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Definition.trace @@ -0,0 +1 @@ +6972496789146285202 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Multiplication.ilean b/server/nng/build/lib/NNG/MyNat/Multiplication.ilean new file mode 100644 index 0000000..7338002 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Multiplication.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.zero":{"usages":[[7,7,7,8]],"definition":null},"c:MyNat.succ":{"usages":[[15,36,15,40]],"definition":null},"c:MyNat.mul_zero":{"usages":[],"definition":[13,6,13,14]},"c:MyNat.mul_succ":{"usages":[],"definition":[15,6,15,14]},"c:MyNat.mul":{"usages":[[11,9,11,18]],"definition":[6,4,6,7]},"c:MyNat.instMulMyNat":{"usages":[],"definition":[10,0,10,8]},"c:MyNat":{"usages":[[6,10,6,15],[6,18,6,23],[6,26,6,31],[10,15,10,20],[13,20,13,25],[15,22,15,27]],"definition":null},"c:Mul.mul":{"usages":[[11,2,11,5]],"definition":null},"c:Mul":{"usages":[[10,11,10,14]],"definition":null}},"module":"NNG.MyNat.Multiplication"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Multiplication.olean b/server/nng/build/lib/NNG/MyNat/Multiplication.olean new file mode 100644 index 0000000..ff3bb8b Binary files /dev/null and b/server/nng/build/lib/NNG/MyNat/Multiplication.olean differ diff --git a/server/nng/build/lib/NNG/MyNat/Multiplication.trace b/server/nng/build/lib/NNG/MyNat/Multiplication.trace new file mode 100644 index 0000000..a9ec026 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Multiplication.trace @@ -0,0 +1 @@ +2052634667963101258 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Addition.ilean b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.ilean new file mode 100644 index 0000000..b6b1277 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:MyNat.zero_add":{"usages":[[36,8,36,16]],"definition":[5,8,5,22]},"c:MyNat.succ_add":{"usages":[[41,8,41,16]],"definition":[24,8,24,22]},"c:MyNat.succ":{"usages":[[24,35,24,39],[24,48,24,52],[44,43,44,47]],"definition":null},"c:MyNat.one_eq_succ_zero":{"usages":[],"definition":[44,8,44,30]},"c:MyNat.add_zero":{"usages":[[7,8,7,16],[15,8,15,16],[16,8,16,16],[26,8,26,16],[27,8,27,16],[37,8,37,16]],"definition":null},"c:MyNat.add_succ":{"usages":[[9,8,9,16],[18,8,18,16],[19,8,19,16],[20,8,20,16],[29,8,29,16],[31,8,31,16],[39,8,39,16]],"definition":null},"c:MyNat.add_comm":{"usages":[],"definition":[34,8,34,22]},"c:MyNat.add_assoc":{"usages":[],"definition":[13,8,13,23]},"c:MyNat":{"usages":[[5,28,5,29],[13,33,13,34],[24,30,24,31],[34,30,34,31],[44,38,44,39]],"definition":null}},"module":"NNG.MyNat.Theorems.Addition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Addition.olean b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.olean new file mode 100644 index 0000000..d44df58 Binary files /dev/null and b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.olean differ diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Addition.trace b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.trace new file mode 100644 index 0000000..bfa62e3 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Theorems/Addition.trace @@ -0,0 +1 @@ +3227530040224467366 \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.ilean b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.ilean new file mode 100644 index 0000000..163a9b6 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.ilean @@ -0,0 +1 @@ +{"version":1,"references":{"c:not_iff_imp_false":{"usages":[],"definition":[0,8,0,25]},"c:Bool.false":{"usages":[[0,49,0,54]],"definition":null}},"module":"NNG.MyNat.Theorems.Proposition"} \ No newline at end of file diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.olean b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.olean new file mode 100644 index 0000000..c520fbe Binary files /dev/null and b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.olean differ diff --git a/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.trace b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.trace new file mode 100644 index 0000000..3b33097 --- /dev/null +++ b/server/nng/build/lib/NNG/MyNat/Theorems/Proposition.trace @@ -0,0 +1 @@ +483796173031302994 \ No newline at end of file diff --git a/server/nng/lake-manifest.json b/server/nng/lake-manifest.json new file mode 100644 index 0000000..7534416 --- /dev/null +++ b/server/nng/lake-manifest.json @@ -0,0 +1,28 @@ +{"version": 4, + "packagesDir": "lake-packages", + "packages": + [{"git": + {"url": "https://github.com/leanprover-community/mathlib4.git", + "subDir?": null, + "rev": "fc4a489c2af75f687338fe85c8901335360f8541", + "name": "mathlib", + "inputRev?": "fc4a489c2af75f687338fe85c8901335360f8541"}}, + {"git": + {"url": "https://github.com/gebner/quote4", + "subDir?": null, + "rev": "cc915afc9526e904a7b61f660d330170f9d60dd7", + "name": "Qq", + "inputRev?": "master"}}, + {"git": + {"url": "https://github.com/JLimperg/aesop", + "subDir?": null, + "rev": "071464ac36e339afb7a87640aa1f8121f707a59a", + "name": "aesop", + "inputRev?": "master"}}, + {"path": {"name": "GameServer", "dir": "./../leanserver"}}, + {"git": + {"url": "https://github.com/leanprover/std4", + "subDir?": null, + "rev": "44a92d84c31a88b9af9329a441890ad449d8cd5f", + "name": "std", + "inputRev?": "main"}}]} diff --git a/server/nng/lakefile.lean b/server/nng/lakefile.lean new file mode 100644 index 0000000..942473c --- /dev/null +++ b/server/nng/lakefile.lean @@ -0,0 +1,14 @@ +import Lake +open Lake DSL + +require GameServer from ".."/"leanserver" + + +require mathlib from git + "https://github.com/leanprover-community/mathlib4.git" @ "fc4a489c2af75f687338fe85c8901335360f8541" +package NNG + +@[default_target] +lean_lib NNG { + moreLeanArgs := #["-DautoImplicit=false"] +} diff --git a/server/nng/lean-toolchain b/server/nng/lean-toolchain new file mode 100644 index 0000000..7f0fd43 --- /dev/null +++ b/server/nng/lean-toolchain @@ -0,0 +1 @@ +leanprover/lean4:nightly-2023-03-09 diff --git a/server/server.Dockerfile b/server/server.Dockerfile index e056a94..7cf6aee 100644 --- a/server/server.Dockerfile +++ b/server/server.Dockerfile @@ -1,15 +1,15 @@ +ARG GAME_DIR FROM elan:latest WORKDIR / # Copy lean files COPY leanserver ./leanserver -COPY testgame ./testgame -# TODO: make `testgame` a build argument +COPY $GAME_DIR ./$GAME_DIR +# TODO: make `adam` a build argument WORKDIR /leanserver RUN rm -f ./build/bin/gameserver RUN lake build WORKDIR /leanserver/build/bin/ -CMD ["./gameserver", "--server"] diff --git a/server/testgame/TestGame.lean b/server/testgame/TestGame.lean deleted file mode 100644 index f48f3f7..0000000 --- a/server/testgame/TestGame.lean +++ /dev/null @@ -1,45 +0,0 @@ -import TestGame.Metadata - -import TestGame.Levels.Proposition -import TestGame.Levels.Implication -import TestGame.Levels.Predicate -import TestGame.Levels.Contradiction -import TestGame.Levels.Prime -import TestGame.Levels.Sum --- import TestGame.Levels.Induction - -import TestGame.Levels.Numbers -import TestGame.Levels.Inequality - -import TestGame.Levels.LeanStuff -import TestGame.Levels.SetTheory -import TestGame.Levels.Function -import TestGame.Levels.SetFunction -import TestGame.Levels.LinearAlgebra - - - -Game "TestGame" -Title "Lean 4 game" -Introduction -" -TODO -" - -Conclusion -"Fertig!" - - -Path Proposition → Implication → Predicate -Path Predicate → Contradiction → Sum → LeanStuff -Path LeanStuff → SetTheory → SetTheory2 → SetFunction - -Path Predicate → Prime -- → Induction -Path Sum → Inequality -- → Induction -Path Inequality → Function - -Path SetTheory2 → Numbers -Path Module → Basis → Module2 -Path LeanStuff → Function → SetFunction - -MakeGame diff --git a/server/testgame/TestGame/LemmaDocs.lean b/server/testgame/TestGame/LemmaDocs.lean deleted file mode 100644 index 3898ba9..0000000 --- a/server/testgame/TestGame/LemmaDocs.lean +++ /dev/null @@ -1,206 +0,0 @@ -import GameServer.Commands - --- Wird im Level "Implication 11" ohne Beweis angenommen. -LemmaDoc not_not as not_not in "Logic" -" -### Aussage - -`¬¬A ↔ A` - -### Annahmen - -`(A : Prop)` -" - --- Wird im Level "Implication 10" ohne Beweis angenommen. -LemmaDoc not_or_of_imp as not_or_of_imp in "Logic" -" -### Aussage - -`¬A ∨ B` - -### Annahmen - -`(A B : Prop)`\\ -`(h : A → B)` -" - --- Wird im Level "Implication 12" bewiesen. -LemmaDoc imp_iff_not_or as imp_iff_not_or in "Logic" -" -### Aussage - -`(A → B) ↔ ¬A ∨ B` - -### Annahmen - -`(A B : Prop)` -" - - -LemmaDoc Nat.succ_pos as Nat.succ_pos in "Nat" -" -" - -LemmaDoc Nat.pos_iff_ne_zero as Nat.pos_iff_ne_zero in "Nat" -" -" - -LemmaDoc zero_add as zero_add in "Addition" -"This lemma says `∀ a : ℕ, 0 + a = a`." - -LemmaDoc add_zero as add_zero in "Addition" -"This lemma says `∀ a : ℕ, a + 0 = a`." - -LemmaDoc add_succ as add_succ in "Addition" -"This lemma says `∀ a b : ℕ, a + succ b = succ (a + b)`." - -LemmaDoc not_forall as not_forall in "Logic" -"`∀ (A : Prop), ¬(∀ x, A) ↔ ∃x, (¬A)`." - -LemmaDoc not_exists as not_exists in "Logic" -"`∀ (A : Prop), ¬(∃ x, A) ↔ ∀x, (¬A)`." - -DefinitionDoc Even -" -`even n` ist definiert als `∃ r, a = 2 * r`. -Die Definition kann man mit `unfold even at *` einsetzen. -" - -DefinitionDoc Odd -" -`odd n` ist definiert als `∃ r, a = 2 * r + 1`. -Die Definition kann man mit `unfold odd at *` einsetzen. -" - -DefinitionDoc Injective -" -`Injective f` ist definiert als - -``` -∀ a b, f a = f b → a = b -``` -definiert. -" - -DefinitionDoc Surjective -" -`Surjective f` ist definiert als - -``` -∀ a, (∃ b, f a = b) -``` -" - -DefinitionDoc Bijective -" -" - -DefinitionDoc LeftInverse -" -" - -DefinitionDoc RightInverse -" -" - -DefinitionDoc StrictMono -" -`StrictMono f` ist definiert als - -``` -∀ a b, a < b → f a < f b -``` - -" - -LemmaDoc even_iff_not_odd as even_iff_not_odd in "Nat" -"`Even n ↔ ¬ (Odd n)`" - -LemmaDoc odd_iff_not_even as odd_iff_not_even in "Nat" -"`Odd n ↔ ¬ (Even n)`" - -LemmaDoc even_square as even_square in "Nat" -"`∀ (n : ℕ), Even n → Even (n ^ 2)`" - - - - -LemmaDoc mem_univ as mem_univ in "Set" -"x ∈ @univ α" - -LemmaDoc not_mem_empty as not_mem_empty in "Set" -"" - -LemmaDoc empty_subset as empty_subset in "Set" -"" - -LemmaDoc Subset.antisymm_iff as Subset.antisymm_iff in "Set" -"" - - - -LemmaDoc Nat.prime_def_lt'' as Nat.prime_def_lt'' in "Nat" -"" - - -LemmaDoc Finset.sum_add_distrib as Finset.sum_add_distrib in "Sum" -"" - -LemmaDoc Fin.sum_univ_castSucc as Fin.sum_univ_castSucc in "Sum" -"" - -LemmaDoc Nat.succ_eq_add_one as Nat.succ_eq_add_one in "Sum" -"" - -LemmaDoc add_comm as add_comm in "Nat" -"" - -LemmaDoc mul_add as mul_add in "Nat" -"" - -LemmaDoc add_mul as add_mul in "Nat" -"" - -LemmaDoc arithmetic_sum as arithmetic_sum in "Sum" -"" - -LemmaDoc add_pow_two as add_pow_two in "Nat" -"" - -LemmaDoc Finset.sum_comm as Finset.sum_comm in "Sum" -"" - -LemmaDoc Function.comp_apply as Function.comp_apply in "Function" -"" - -LemmaDoc not_le as not_le in "Logic" -"" - -LemmaDoc if_pos as if_pos in "Logic" -"" - -LemmaDoc if_neg as if_neg in "Logic" -"" - -LemmaDoc StrictMono.injective as StrictMono.injective in "Function" -"" - -LemmaDoc StrictMono.add as StrictMono.add in "Function" -"" - -LemmaDoc Odd.strictMono_pow as Odd.strictMono_pow in "Function" -"" - -LemmaDoc Exists.choose as Exists.choose in "Function" -"" - -LemmaDoc Exists.choose_spec as Exists.choose_spec in "Function" -"" -LemmaDoc congrArg as congrArg in "Function" -"" -LemmaDoc congrFun as congrFun in "Function" -"" - -LemmaDoc Iff.symm as Iff.symm in "Logic" -"" diff --git a/server/testgame/TestGame/Levels/Contradiction.lean b/server/testgame/TestGame/Levels/Contradiction.lean deleted file mode 100644 index 5805bb1..0000000 --- a/server/testgame/TestGame/Levels/Contradiction.lean +++ /dev/null @@ -1,16 +0,0 @@ -import TestGame.Levels.Contradiction.L01_Have -import TestGame.Levels.Contradiction.L02_Suffices -import TestGame.Levels.Contradiction.L03_ByContra -import TestGame.Levels.Contradiction.L04_ByContra -import TestGame.Levels.Contradiction.L05_Contrapose -import TestGame.Levels.Contradiction.L06_Summary - -Game "TestGame" -World "Contradiction" -Title "Widerspruch" - -Introduction " -Ihr begebt euch auf die Suche nach *Oddeus*. Nach etwas rumfragen, kommt ihr tatsächlich an -eine Dornenfestung und nachdem ihr erklärt habt, wer ihr seit, werdet ihr auf eine Audienz -gebeten. -" diff --git a/server/testgame/TestGame/Levels/Function.lean b/server/testgame/TestGame/Levels/Function.lean deleted file mode 100644 index 0d2770d..0000000 --- a/server/testgame/TestGame/Levels/Function.lean +++ /dev/null @@ -1,24 +0,0 @@ -import TestGame.Levels.Function.L01_Function -import TestGame.Levels.Function.L02_Let -import TestGame.Levels.Function.L03_Piecewise -import TestGame.Levels.Function.L04_Injective -import TestGame.Levels.Function.L05_Injective -import TestGame.Levels.Function.L06_Injective -import TestGame.Levels.Function.L07_Surjective -import TestGame.Levels.Function.L08_Bijective -import TestGame.Levels.Function.L09_Inverse -import TestGame.Levels.Function.L11_Inverse - -Game "TestGame" -World "Function" -Title "Abbildungen" - -Introduction " -Auf der Suche nach dem Buch der Urbilder landet ihr auf einem kleinen Mond, der bis auf -eine Insel komplett mit Wasser bedeckt zu sein scheint. - -Auf der Insel seht ihr verschiedene große und kleine Behausungen, manche aus Stroh und Holz, -vereinzelte aus Lehm. - -Planlos geht ihr zum ersten Haus bei dem jemand vorne außen sitzt. -" diff --git a/server/testgame/TestGame/Levels/Induction.lean b/server/testgame/TestGame/Levels/Induction.lean deleted file mode 100644 index c79daa1..0000000 --- a/server/testgame/TestGame/Levels/Induction.lean +++ /dev/null @@ -1,5 +0,0 @@ -import TestGame.Levels.Induction.L01_Induction - -Game "TestGame" -World "Induction" -Title "Übungen Induktions" diff --git a/server/testgame/TestGame/Levels/Inequality.lean b/server/testgame/TestGame/Levels/Inequality.lean deleted file mode 100644 index 12df4bf..0000000 --- a/server/testgame/TestGame/Levels/Inequality.lean +++ /dev/null @@ -1,8 +0,0 @@ -import TestGame.Levels.Inequality.L01_LE -import TestGame.Levels.Inequality.L02_Pos -import TestGame.Levels.Inequality.L03_Linarith -import TestGame.Levels.Inequality.L04_Linarith - -Game "TestGame" -World "Inequality" -Title "Ungleichung" diff --git a/server/testgame/TestGame/Levels/Inequality/L01_LE.lean b/server/testgame/TestGame/Levels/Inequality/L01_LE.lean deleted file mode 100644 index e3d1b9c..0000000 --- a/server/testgame/TestGame/Levels/Inequality/L01_LE.lean +++ /dev/null @@ -1,24 +0,0 @@ -import TestGame.Metadata - -Game "TestGame" -World "Inequality" -Level 1 - -Title "Kleinergleich" - -Introduction -" -Ungleichheiten werden in Lean generell immer als Kleinergleich `≤` (`\\le`) oder `<` -geschrieben. - -Die Symbole `≥` und `>` gibt es zwar auch, sind aber nur Notation für die gleiche -Aussage mit `≤` und `<`. - -Zudem sind `<` und `≤` auf `ℕ` so definiert, dass `0 < n` und `1 ≤ n` per Definition -äquivalent sind. Die folgende Aussage ist also mit `rfl` beweisbar. -" - -Statement -"$0 < n$ und $1 ≤ n$ sind äquivalente Aussagen." - (n m : ℕ) : m < n ↔ m.succ ≤ n := by - rfl diff --git a/server/testgame/TestGame/Levels/Inequality/L02_Pos.lean b/server/testgame/TestGame/Levels/Inequality/L02_Pos.lean deleted file mode 100644 index 9ebd15c..0000000 --- a/server/testgame/TestGame/Levels/Inequality/L02_Pos.lean +++ /dev/null @@ -1,78 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Tactic.LibrarySearch - -set_option tactic.hygienic false - -Game "TestGame" -World "Inequality" -Level 2 - -Title "Kleinergleich" - -Introduction -" -Es gibt zwei intrinsische Möglichkeiten, zu sagen dass `(n : ℕ)` nicht Null ist: -`n ≠ 0` oder `0 < n`. - -Das folgende Lemma kannst du immer brauchen um zwischen den beiden zu wechseln. - -(*Note:* `0 < n` wird in Lemma-Namen oft mit `_pos` beschrieben anstatt `zero_lt`, siehe z.B. -`Nat.succ_pos`.) - - -" - -Statement Nat.pos_iff_ne_zero -"Benutze Induktion um zu zeigen, dass $0 < n$ und $n \\ne 0$ äquivalent sind." - (n : ℕ) : 0 < n ↔ n ≠ 0 := by - induction n - simp - constructor - intro - simp - intro - apply Nat.succ_pos - -NewTactic simp -NewLemma Nat.succ_pos - -Hint : 0 < Nat.zero ↔ Nat.zero ≠ 0 => -"Den Induktionsanfang kannst du oft mit `simp` lösen." - -Hint (n : ℕ) (h : 0 < n ↔ n ≠ 0) : 0 < Nat.succ n ↔ Nat.succ n ≠ 0 => -"Jetzt der Induktionsschritt. Fang mal mit `constructor` an." - -HiddenHint (n : ℕ) : 0 < Nat.succ n → Nat.succ n ≠ 0 => -"Auch das kann `simp`." - -Hint (n : ℕ) : n.succ ≠ 0 => -"Auch das kann `simp`." - -Hint (n : ℕ) : 0 < Nat.succ n => -"Hier kannst du das Lemma `Nat.succ_pos` mit `apply` anwenden." - - - -/- Second, less ideal path -/ - -Hint (n : ℕ) (h : 0 < n) : n ≠ 0 => -"An dieser Stelle fürst du am besten einen Beweis durch Widerspruch." - -HiddenHint (n : ℕ) (h : 0 < n) : n ≠ 0 => -"Das macht man mit `by_contra`." - -Hint (n : ℕ) (h : 0 < n) (g : n = 0) : False => -"Brauche `rw [_] at _` um eine Annahme `0 < 0` zu erzeugen." - -HiddenHint (h : 0 < 0) : False => -"Mit `contradiction` schliesst du den Widerspruchsbeweis." - -Hint (n : ℕ) (h : n ≠ 0) : 0 < n => -"Diese Richtung beweist du am besten per Induktion." - -HiddenHint (n : ℕ) (h : n ≠ 0) : 0 < n => -"Starte mit `induction n`." - - HiddenHint : 0 < Nat.zero => -"Mit `contradiction` kannst du den Induktionsanfang schliessen." diff --git a/server/testgame/TestGame/Levels/Inequality/L03_Linarith.lean b/server/testgame/TestGame/Levels/Inequality/L03_Linarith.lean deleted file mode 100644 index b63fab6..0000000 --- a/server/testgame/TestGame/Levels/Inequality/L03_Linarith.lean +++ /dev/null @@ -1,23 +0,0 @@ -import TestGame.Metadata -import Mathlib.Tactic.Linarith - -Game "TestGame" -World "Inequality" -Level 3 - -Title "Linarith" - -Introduction -" -Die Taktik `linarith` kann alle Systeme von linearen (Un-)gleichungen über `ℤ`, `ℚ`, etc. lösen. -Über `ℕ` ist sie etwas schwächer, aber einfache Aussagen kann sie trotzdem beweisen. -" - -Statement -"Wenn $n \\ge 2$, zeige, dass $n$ nich Null sein kann." - (n : ℕ) (h : 2 ≤ n) : n ≠ 0 := by - linarith - -NewTactic linarith - -NewLemma Nat.pos_iff_ne_zero diff --git a/server/testgame/TestGame/Levels/Inequality/L04_Linarith.lean b/server/testgame/TestGame/Levels/Inequality/L04_Linarith.lean deleted file mode 100644 index b06c0fc..0000000 --- a/server/testgame/TestGame/Levels/Inequality/L04_Linarith.lean +++ /dev/null @@ -1,28 +0,0 @@ -import TestGame.Metadata -import Mathlib.Tactic.Linarith - -Game "TestGame" -World "Inequality" -Level 4 - -Title "Linarith" - -Introduction -" -Sobald man mit einem Ring arbeitet, der eine lineare Order hat (also z.B. `ℤ` oder `ℚ`), -ist `linarith` stärker und kann Systeme von Gleichungen und Ungleichungen angehen. - -`linarith` kann aber nur mit linearen Ungleichungen umgehen, mit Termen der Form `x ^ 2` -kann es nicht umgehen. -" - -Statement -" -Angenommen man hat für zwei Ganzzahlen $x, y$ folgende Ungleichungen. -$$ -\\begin{aligned} 5 * y &\\le 35 - 2 * x \\\\ 2 * y &\\le x + 3 \\end{aligned} -$$ -Zeige, dass $y \\le 5$. -" - (x y : ℤ) (h₂ : 5 * y ≤ 35 - 2 * x) (h₃ : 2 * y ≤ x + 3) : y ≤ 5 := by - linarith diff --git a/server/testgame/TestGame/Levels/LeanStuff.lean b/server/testgame/TestGame/Levels/LeanStuff.lean deleted file mode 100644 index c0e6935..0000000 --- a/server/testgame/TestGame/Levels/LeanStuff.lean +++ /dev/null @@ -1,8 +0,0 @@ -import TestGame.Levels.LeanStuff.L01_Type -import TestGame.Levels.LeanStuff.L02_Universe -import TestGame.Levels.LeanStuff.L03_ImplicitArguments -import TestGame.Levels.LeanStuff.L04_InstanceArguments - -Game "TestGame" -World "LeanStuff" -Title "Lean" diff --git a/server/testgame/TestGame/Levels/LeanStuff/L01_Type.lean b/server/testgame/TestGame/Levels/LeanStuff/L01_Type.lean deleted file mode 100644 index 1a6fd1c..0000000 --- a/server/testgame/TestGame/Levels/LeanStuff/L01_Type.lean +++ /dev/null @@ -1,49 +0,0 @@ -import TestGame.Metadata - -import Mathlib - -set_option tactic.hygienic false - -Game "TestGame" -World "LeanStuff" -Level 1 - -Title "Typen" - -Introduction -" -Dieses Kapitel führt ein paar Lean-spezifische Sachen ein, die du wissen solltest. - -Mathematisch haben diese Sachen keinen Inhalt, aber es ist wichtig, dass du etwas -verstehst wie Lean manche Sachen macht. - -Als erstes geht es um Typen. - -Oft sieht man Argumente von der Form `(U : Type)` was heisst \"sei $U$ ein Typ.\" -Als Mathematiker kann man sich Typen ein bisschen wie Mengen vorstellen, in dem Sinn -dass sie die Grundlage der Mathematik bilden: Alles sind Typen. - -Zum Beispiel ist `ℕ` der Typ der natürlichen Zahlen, `Prop` der Typ der logischen -Aussagen, und ein Ring ist ein Typ `(R : Type)` zusammen mit einer Instanz `[Ring R]`, -die sagt, dass auf diesem Typ eine Ringstruktur besteht. - -**Achtung**: Wie du aber gleich sehen wirst sind Typen und Mengen in Lean unterschiedliche -Sachen. - -Hier ein kleines Beispiel zu Typen und Instanzen: -" - -Statement -"" - (R : Type) [CommRing R] (a b : R) : a + b = b + a := by - ring - -Hint (R : Type) (h : CommRing R) (a : R) (b : R) : a + b = b + a => -" -Die Taktik `ring` funktioniert in jedem Typen, -ist aber stärker, je nach Instanz auf dem Typen. - -In Mathlib sind Instanzen `[CommSemiring ℕ]`, [CommRing ℤ]`, `[Field ℚ]`, etc. definiert. -Die Taktik `ring` muss eine dieser Instanzen finden, die sagen, dass die Addition kommutative ist, -damit das Lemma `add_comm` angewendet und die Aussage bewiesen werden kann. -" diff --git a/server/testgame/TestGame/Levels/LeanStuff/L02_Universe.lean b/server/testgame/TestGame/Levels/LeanStuff/L02_Universe.lean deleted file mode 100644 index c75343e..0000000 --- a/server/testgame/TestGame/Levels/LeanStuff/L02_Universe.lean +++ /dev/null @@ -1,51 +0,0 @@ -import TestGame.Metadata - -import Mathlib - -set_option tactic.hygienic false - -Game "TestGame" -World "LeanStuff" -Level 2 - -Title "Universen" - -Introduction -" -Ein weitere Syntax, den man in Lean abundzu sieht sind Universen. - -Diese sind für Mathematiker erst einmal nicht so wichtig, und es reicht zu wissen, -dass diese existieren. - -Da alle Objekte in Lean einen Typ haben, kann man sich fragen, welchen Typ hat eigentlich `Type` -selber? Die Anwort darauf ist dass `Type` vom Typ `Type 1` ist und dieses wiederum vom Typ `Type 2` -usw. - -Da Lemmas in Lean gerne so algemein wie möglich formuliert werden, sieht man oft `(R : Type _)` -anstatt `(R : Type)`, wobei `_` einfach ein Platzhalter für eine Zahl ist. - -Alternativ kann man auch explizit Universum-Levels definieren, so sind die folgenden beiden -Aussdrücke äquivalent: - -``` -variable (R : Type _) - -universe u -variable (R : Type u) -``` - -In der Praxis kann man immer ohne bedenken `Type _` verwendenen und wenn man auf -(mengentheoretische) -Probleme stösst, muss man dan eventuell die Universen spezifizieren. - -*Die Normalform ist eigentlich `(R : Type _)` zu schreiben solange man kein Grund hat -das Universum einzuschränken.* -" - -Statement -"" - (R : Type _) [CommRing R] (a b : R) : a + b = b + a := by - ring - --- Hint (R : Type) (h : CommRing R) (a : R) (b : R) : a + b = b + a => --- "" diff --git a/server/testgame/TestGame/Levels/LeanStuff/L03_ImplicitArguments.lean b/server/testgame/TestGame/Levels/LeanStuff/L03_ImplicitArguments.lean deleted file mode 100644 index 1d85c83..0000000 --- a/server/testgame/TestGame/Levels/LeanStuff/L03_ImplicitArguments.lean +++ /dev/null @@ -1,63 +0,0 @@ -import TestGame.Metadata - -import Mathlib -import TestGame.Options.BigOperators - -set_option tactic.hygienic false - -Game "TestGame" -World "LeanStuff" -Level 3 - -Title "Implizite Argumente" - -Introduction -" - -Auch wichtiger Syntax ist der Unterschied zwischen -impliziten und expliziten Argumenten von Lemmas. **Explizite Argumente** -schreibt man mit runden Klammern `()`, **impliziete Argumente** mit geschweiften `{}`. - -Als implizit werden alle Argumente markiert, die Lean selbständig aus dem Kontext -erschliessen und einfüllen kann. - -Als Beispiel schauen wir uns ein bekanntes Lemma an: -``` -lemma Fin.sum_univ_castSucc {β : Type _} [AddCommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) : - ∑ i : Fin (n + 1), f i = ∑ i : Fin n, f (↑Fin.castSucc.toEmbedding i) + f (Fin.last n) := by - sorry -``` - -Hier ist unter anderem `n` als implizites Argument angegeben, da Lean aus `f` herauslesen kann, -was `n` sein muss. Falls man trotzdem einmal das implizites Argument angeben muss -(z.B. um `rw` zu helfen, wenn es mehrere Möglichkeiten gibt), -kann man dies mit `Fin.sum_univ_castSucc (n := m + 1)` machen. -" - -open BigOperators - -Statement -"Zeige $(\\sum_{i=0}^{m} i) + (m + 1) = \\sum_{i=0}^{m + 1} i$." - (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i := by - rw [Fin.sum_univ_castSucc (n := m + 1)] - rfl - -OnlyTactic rw rfl - -NewLemma Fin.sum_univ_castSucc - -HiddenHint (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i => -"Das Lemma `Fin.sum_univ_castSucc` hilft." - -Hint (m : ℕ) : - ∑ i : Fin m, (Fin.castSucc.toEmbedding i : ℕ) + ↑(Fin.last m) + (m + 1) = - ∑ i : Fin (Nat.succ m + 1), ↑i => -"Hier hat `rw` die falsche der beiden Summen umgeschrieben. Hilf ihm mit -`rw [Fin.sum_univ_castSucc (n := m + 1)]`." - -Hint (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = - ∑ i : Fin (m + 1), ↑i + (m + 1) => -"Jetzt sind beide Seiten gleich und das Goal kann mit `rfl` geschlossen werden." diff --git a/server/testgame/TestGame/Levels/LeanStuff/L04_InstanceArguments.lean b/server/testgame/TestGame/Levels/LeanStuff/L04_InstanceArguments.lean deleted file mode 100644 index b06d3d2..0000000 --- a/server/testgame/TestGame/Levels/LeanStuff/L04_InstanceArguments.lean +++ /dev/null @@ -1,78 +0,0 @@ -import TestGame.Metadata - -import Mathlib -import TestGame.Options.BigOperators - -set_option tactic.hygienic false - -Game "TestGame" -World "LeanStuff" -Level 4 - -Title "Instanz-Argumente" - -Introduction -" -Bezüglich impliziten Argumente gibt es noch einige weitere Punkte oder Tricks, -die man wissen sollte. - -* Instanz-Argumente wie `[Ring R]` sind auch impilzite Argumente. Der Unterschied ist, dass - Lean einen anderen Mechanismus braucht, um diese zu füllen: Es sucht nach einer entsprechenden - *Instanz* und, setzt die erste solche Instanz ein. - Ausserhalb eines Beweises könnte man auch mit - ``` - #synth Ring ℤ - ``` - testen, ob Lean eine ensprechende Instanz findet. Instanzen werden dafür gebraucht, Typen - mit (algebraischer) Stukturen zu versehen. -* Ein `_` irgendwo im Lean-Code ist immer ein Platzhalter, den Lean versucht aus dem Kontext zu - füllen. Das kann praktisch sein, wenn man etwas nicht ausschreiben will, das offensichtlich ist. -* Mit `@` kann man forcieren, dass alle Argumente explizit sind. - Für ein Lemma - ``` - lemma not_or_of_imp {A B : Prop} (h : A → B) : - ¬A ∨ B := sorry - ``` - heisst das zum Beispiel dass `not_or_of_imp g` das gleiche ist wie - `@not_or_of_imp _ _ g`. - - Und `Fin.sum_univ_castSucc (n := m + 1)` könnte man auch als - `@Fin.sum_univ_castSucc _ _ (m + 1)` schreiben. -" - -open BigOperators - -Statement -"Zeige $(\\sum_{i=0}^{m} i) + (m + 1) = \\sum_{i=0}^{m + 1} i$." - (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i := by - rw [Fin.sum_univ_castSucc (n := m + 1)] - rfl - -OnlyTactic rw rfl - -NewLemma Fin.sum_univ_castSucc - -Hint (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = ∑ i : Fin (Nat.succ m + 1), ↑i => -" - Probier nochmals das gleiche, diesmal mit -``` -rw [@Fin.sum_univ_castSucc _ _ (m + 1)] -``` -anstatt -``` -rw [Fin.sum_univ_castSucc (n := m + 1)] -``` -" - -Hint (m : ℕ) : - ∑ i : Fin m, (Fin.castSucc.toEmbedding i : ℕ) + ↑(Fin.last m) + (m + 1) = - ∑ i : Fin (Nat.succ m + 1), ↑i => -"Sackgasse!" - - -Hint (m : ℕ) : - ∑ i : Fin (m + 1), (i : ℕ) + (m + 1) = - ∑ i : Fin (m + 1), ↑i + (m + 1) => -"Jetzt sind beide Seiten gleich und das Goal kann mit `rfl` geschlossen werden." diff --git a/server/testgame/TestGame/Levels/LinearAlgebra.lean b/server/testgame/TestGame/Levels/LinearAlgebra.lean deleted file mode 100644 index 816817f..0000000 --- a/server/testgame/TestGame/Levels/LinearAlgebra.lean +++ /dev/null @@ -1,35 +0,0 @@ -import TestGame.Levels.LinearAlgebra.L01_Module -import TestGame.Levels.LinearAlgebra.L02_VectorNotation -import TestGame.Levels.LinearAlgebra.L03_VectorNotation -import TestGame.Levels.LinearAlgebra.L04_Submodule -import TestGame.Levels.LinearAlgebra.L05_Submodule -import TestGame.Levels.LinearAlgebra.L06_Span -import TestGame.Levels.LinearAlgebra.L07_Span -import TestGame.Levels.LinearAlgebra.L08_GeneratingSet - -import TestGame.Levels.LinearAlgebra.M01_LinearMap -import TestGame.Levels.LinearAlgebra.M02_LinearIndep -import TestGame.Levels.LinearAlgebra.M04_Basis -import TestGame.Levels.LinearAlgebra.M05_Basis - -import TestGame.Levels.LinearAlgebra.N01_Span -import TestGame.Levels.LinearAlgebra.N02_Span -import TestGame.Levels.LinearAlgebra.N03_Idempotent -import TestGame.Levels.LinearAlgebra.N04_Idempotent -import TestGame.Levels.LinearAlgebra.N05_Sum -import TestGame.Levels.LinearAlgebra.N06_Sum -import TestGame.Levels.LinearAlgebra.N07_Prod -import TestGame.Levels.LinearAlgebra.N08_Prod -import TestGame.Levels.LinearAlgebra.N09_Prod - -Game "TestGame" -World "Module" -Title "Vektorraum" - -Game "TestGame" -World "Basis" -Title "Lineare Abbildungen" - -Game "TestGame" -World "Module2" -Title "Mehr Vektorräume" diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/L01_Module.lean b/server/testgame/TestGame/Levels/LinearAlgebra/L01_Module.lean deleted file mode 100644 index b471da9..0000000 --- a/server/testgame/TestGame/Levels/LinearAlgebra/L01_Module.lean +++ /dev/null @@ -1,91 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Data.Real.Basic -- definiert `ℝ` -import Mathlib.Algebra.Module.Basic -- definiert `module` -import Mathlib.Tactic.LibrarySearch - -set_option tactic.hygienic false - -Game "TestGame" -World "Module" -Level 1 - -Title "Module" - -Introduction -" -Vektorräume sind in Lean etwas algemeiner definiert, als dies normalerweise in -einer Einführungsvorlesung antrifft: Man definiert ein \"Modul\" (Plural: Moduln) -über einem Ring. Ein Modul über einem Körper wird auch \"Vektorraum\" genannt. -Konkret heisst das: - -Sei `R` ein Ring. Ein `R`-Modul ist eine kommutative Gruppe `(V, +)` zusammen mit -einer Abbildung `• : R × V → V` (Skalarmultiplitation genannt), die folgende -Eigenschaften beliebige `(r s : R)` und `(v w : V)`erfüllt: -- `r • (v + w) = r • v + r • w` -- `(r + s) • v = r • v + s • v` -- `(r * s) • v = r • s • v` -- `1 • r = r` -- `0 • v = 0` -- `r • 0 = 0` - -Bemerkungen: -1) Über einem `[field R]` sind die letzten beiden Eigenschaften überflüssig, diese kann - man beweisen, wenn man Cancellation (`a₁ + x = a₂ + x → a₁ = a₂`) hat. In einem generellen - Ring, muss das aber nicht gegeben sein (siehe Nullteiler). -2) Die nötigen Annahmen um ein Modul in Lean zu erhalten sind tatsächlich noch etwas lockerer, - so muss `R` nicht ganz ein Ring sein (nur `[semiring R]`) und - `V` muss nicht ganz eine kommutative Gruppe sein (nur `[add_comm_monoid V]`). - - -Einen abstrakten Vektorraum definiert man wie folgt: -`variables {R V : Type*} [field R] [add_comm_monoid V] [module R V]` - -Wenn man hingegen konkret zeigen will, dass ein existierendes Objekt ein Vektorraum ist, -kann man eine einsprechende Instanz wie folgt definieren: - -``` -instance Q_module : Module ℚ ℝ := -{ smul := λa r, ↑a * r - smul_zero := _ - zero_smul := _ - one_smul := _ - smul_add := _ - add_smul := _ - mul_smul := _ } -``` -Man muss also angeben, welche Skalarmultiplikation man gerne hätte -(`smul`. In unserem Fall sagen wir einfach, diese soll Multiplikation in `ℝ` sein.) -und dazu jegliche Beweise, dass die Skalarmultiplikation sich mit der Ringstruktur verträgt. -Im nachfolgenden beweisen wir die Eigenschaften einzeln. -" - -Statement -"Zeige, dass $\\mathbb{R}$ ein $\\mathbb{Q}$-Modul ist." - : Module ℚ ℝ := by - refine { - smul := fun a r => ↑a * r - smul_zero := ?smul_zero - zero_smul := ?zero_smul - one_smul := ?one_smul - smul_add := ?smul_add - add_smul := ?add_smul - mul_smul := ?mul_smul } - - · intro b - change (1 : ℚ) * b = b - rw [Rat.cast_one, one_mul] - · intro x y b - change (x * y : ℚ) * b = x * (y * b) - rw [Rat.cast_mul, mul_assoc] - · intro a - rw [smul_zero] - · intro a x y - change a * (x + y) = a * x + a * y - rw [mul_add] - · intro r s x - change (r + s : ℚ) * x = r * x + s * x - rw [Rat.cast_add, add_mul] - · intro a - change (0 : ℚ) * a = 0 - simp diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/M02_LinearIndep.lean b/server/testgame/TestGame/Levels/LinearAlgebra/M02_LinearIndep.lean deleted file mode 100644 index 0114b45..0000000 --- a/server/testgame/TestGame/Levels/LinearAlgebra/M02_LinearIndep.lean +++ /dev/null @@ -1,40 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Algebra.Module.Submodule.Lattice -import Mathlib.Data.Real.Basic -- definiert `ℝ` -import Mathlib.Algebra.Module.LinearMap -- definiert `→ₗ` -import Mathlib.Tactic.FinCases -import Mathlib.Data.Fin.VecNotation --- import Mathlib.LinearAlgebra.Finsupp -import Mathlib.Algebra.BigOperators.Basic -- default --- import Mathlib.LinearAlgebra.LinearIndependent - -Game "TestGame" -World "Basis" -Level 2 - -Title "Lineare Unabhängigkeit" - ---notation "ℝ²" => Fin 2 → ℝ - -Introduction -" -" - -Statement -"Zeige, dass `![1, 0], ![1, 1]` linear unabhängig über `ℝ` sind." - : True := by -- linearIndependent ℝ ![(![1, 0] : ℝ²), ![1, 1]] := by - trivial - --- begin --- rw fintype.linear_independent_iff, --- intros c h, --- simp at h, --- intros i, --- fin_cases i, --- swap, --- { exact h.2 }, --- { have h' := h.1, --- rw [h.2, add_zero] at h', --- exact h'} --- end diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/M04_Basis.lean b/server/testgame/TestGame/Levels/LinearAlgebra/M04_Basis.lean deleted file mode 100644 index 66c3304..0000000 --- a/server/testgame/TestGame/Levels/LinearAlgebra/M04_Basis.lean +++ /dev/null @@ -1,19 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Algebra.Module.Submodule.Lattice - -Game "TestGame" -World "Basis" -Level 4 - -Title "Basis" - -Introduction -" - -" - -Statement -"" - : True := by -- Basis (Fin 2) ℝ ℝ² := by - trivial diff --git a/server/testgame/TestGame/Levels/LinearAlgebra/M05_Basis.lean b/server/testgame/TestGame/Levels/LinearAlgebra/M05_Basis.lean deleted file mode 100644 index ed5be65..0000000 --- a/server/testgame/TestGame/Levels/LinearAlgebra/M05_Basis.lean +++ /dev/null @@ -1,19 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Algebra.Module.Submodule.Lattice - -Game "TestGame" -World "Basis" -Level 5 - -Title "Lineare Abbildung" - -Introduction -" - -" - -Statement -"" - : True := by - trivial diff --git a/server/testgame/TestGame/Levels/Numbers.lean b/server/testgame/TestGame/Levels/Numbers.lean deleted file mode 100644 index 622c5a4..0000000 --- a/server/testgame/TestGame/Levels/Numbers.lean +++ /dev/null @@ -1,2 +0,0 @@ -import TestGame.Levels.Numbers.L01_PNat -import TestGame.Levels.Numbers.L02_PNat diff --git a/server/testgame/TestGame/Levels/Prime.lean b/server/testgame/TestGame/Levels/Prime.lean deleted file mode 100644 index c9fb5f6..0000000 --- a/server/testgame/TestGame/Levels/Prime.lean +++ /dev/null @@ -1,8 +0,0 @@ -import TestGame.Levels.Prime.L01_Dvd -import TestGame.Levels.Prime.L04_Prime -import TestGame.Levels.Prime.L05_Prime -import TestGame.Levels.Prime.L06_ExistsUnique - -Game "TestGame" -World "Prime" -Title "Teilbarkeit" diff --git a/server/testgame/TestGame/Levels/Prime/L01_Dvd.lean b/server/testgame/TestGame/Levels/Prime/L01_Dvd.lean deleted file mode 100644 index 5edc0da..0000000 --- a/server/testgame/TestGame/Levels/Prime/L01_Dvd.lean +++ /dev/null @@ -1,52 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Tactic.Ring - -Game "TestGame" -World "Prime" -Level 1 - -Title "Teilbarkeit" - -Introduction -" -Die Aussage \"$m$ teilt $n$.\" wird in Lean als `m | n` (`\\|`) geschrieben. - -**Wichtig:** `∣` (Teilbarkeit) ist ein spezielles Unicode Symbol, das nicht dem -senkrechten Strich auf der Tastatur (`|`) entspricht. Man erhält es mit `\\|`. - -`m ∣ n` bedeutet `∃ c, n = m * c`, das heisst, man kann damit genau gleich umgehen -wie mit einem `∃`-Quantifier. -" - -Statement dvd_add - "Wenn $m$ ein Teiler von $n$ und $k$ ist, dann teilt es die Summe." - (n m k : ℕ) (h : m ∣ n) (g : m ∣ k) : m ∣ n + k := by - rcases h with ⟨x, h⟩ - rcases g with ⟨y, g⟩ - use x + y - rw [h, g] - ring - -HiddenHint (n : ℕ) (m : ℕ) (k : ℕ) (h : m ∣ n) (g : m ∣ k) : m ∣ n + k => -" -Wenn man explizit mit der Definition von Teilbarkeit arbeiten will, -sollte man als erstes alle Annahmen der Form `x ∣ y` mit `rcases` aufteilen. -" - -HiddenHint (n : ℕ) (m : ℕ) (k : ℕ) (x : ℕ) (h : n = m * x) (g : m ∣ k) : m ∣ n + k => -" -Wenn man explizit mit der Definition von Teilbarkeit arbeiten will, -sollte man als erstes alle Annahmen der Form `x ∣ y` mit `rcases` aufteilen. -" - -HiddenHint (n : ℕ) (m : ℕ) (k : ℕ) (y : ℕ) (h : m ∣ n) (g : k = m * y) : m ∣ n + k => -" -Wenn man explizit mit der Definition von Teilbarkeit arbeiten will, -sollte man als erstes alle Annahmen der Form `x ∣ y` mit `rcases` aufteilen. -" - -HiddenHint (n : ℕ) (m : ℕ) (k : ℕ) (x : ℕ) (y : ℕ) (h : n = m * x) (g : k = m * y) : m ∣ n + k => -" -Jetzt kannst du mit `use` eine Zahl angeben, so dass $m * X = n + k$. -" diff --git a/server/testgame/TestGame/Levels/Prime/L04_Prime.lean b/server/testgame/TestGame/Levels/Prime/L04_Prime.lean deleted file mode 100644 index 9256544..0000000 --- a/server/testgame/TestGame/Levels/Prime/L04_Prime.lean +++ /dev/null @@ -1,46 +0,0 @@ -import TestGame.Metadata -import Mathlib.Data.Nat.Prime - -import Std.Tactic.RCases -import Mathlib.Tactic.LeftRight -import Mathlib.Tactic.Contrapose -import Mathlib.Tactic.Use -import Mathlib.Tactic.Ring - -import TestGame.ToBePorted - -Game "TestGame" -World "Prime" -Level 2 - -Title "Primzahlen" - -Introduction -" -Eine Primzahl wird mit `(n : ℕ) (h : Nat.Prime n)` dargestellt. - -Wichtige Lemmas über Primzhalen werden mit - -``` -import Data.Nat.Prime -``` -importiert (siehe -[Docs](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Nat/Prime.html)). - -Insbesondere `Nat.prime_def_lt''` welches die aus der Schule bekannte Definition einer -Primzahl `Prime p ↔ 2 ≤ p ∧ (∀ m, m ∣ p → m = 1 ∨ m = p)` gibt. - -Beachte: In Lean gibt es auch noch den Ausdruck `Prime n`, der beschreibt generelle -Primelemente in einem generellen Ring. Wenn man mit natürlichen -Zahlen arbeitet, ist es besser `Nat.Prime` zu verwenden, obwohl man natürlich zeigen kann -dass die beiden äquivalent sind. -" - -Statement -"Zeige dass die einzigen Teiler einer Primzahl $1$ und $p$ sind." - (p : ℕ) (h : Nat.Prime p) : ∀ (x : ℕ), (x ∣ p) → x = 1 ∨ x = p := by - rw [Nat.prime_def_lt''] at h - rcases h with ⟨_, h₂⟩ - assumption - -NewLemma Nat.prime_def_lt'' diff --git a/server/testgame/TestGame/Levels/Prime/L05_Prime.lean b/server/testgame/TestGame/Levels/Prime/L05_Prime.lean deleted file mode 100644 index 61497bd..0000000 --- a/server/testgame/TestGame/Levels/Prime/L05_Prime.lean +++ /dev/null @@ -1,42 +0,0 @@ -import TestGame.Metadata -import Mathlib.Data.Nat.Prime - -import Std.Tactic.RCases -import Mathlib.Tactic.LeftRight -import Mathlib.Tactic.Contrapose -import Mathlib.Tactic.Use -import Mathlib.Tactic.Ring - -import TestGame.ToBePorted - -Game "TestGame" -World "Prime" -Level 3 - -Title "Primzahlen" - -Introduction -" -Mathematisch gesehen, bedeutet die Definition von vorhin dass $p$ ein -irreduzibles Element ist, und Primzahlen sind oft durch -`∀ (a b : ℕ), p ∣ a * b → p ∣ a ∨ p ∣ b` -definiert. Auf den natürlichen Zahlen, sind die beiden äquivalent. -" - -Statement -"Zeige dass $p \\ge 2$ eine Primzahl ist, genau dann wenn -$p \\mid a\\cdot b \\Rightarrow (p \\mid a) \\lor (p \\mid b)$." - (p : ℕ) (h₂ : 2 ≤ p): - Nat.Prime p ↔ ∀ (a b : ℕ), p ∣ a * b → p ∣ a ∨ p ∣ b := by - constructor - intro h a b - apply (Nat.Prime.dvd_mul h).mp - intro h - rw [Nat.prime_iff] - change p ≠ 0 ∧ ¬IsUnit p ∧ ∀ a b, p ∣ a * b → p ∣ a ∨ p ∣ b - rw [Nat.isUnit_iff, ←and_assoc] - constructor - constructor - linarith - linarith - assumption diff --git a/server/testgame/TestGame/Levels/SetFunction.lean b/server/testgame/TestGame/Levels/SetFunction.lean deleted file mode 100644 index bf9cfbc..0000000 --- a/server/testgame/TestGame/Levels/SetFunction.lean +++ /dev/null @@ -1,8 +0,0 @@ -import TestGame.Levels.SetFunction.L01_Image -import TestGame.Levels.SetFunction.L02_Preimage -import TestGame.Levels.SetFunction.L03_Range -import TestGame.Levels.SetFunction.L04_ImageUnion - -Game "TestGame" -World "SetFunction" -Title "Abbildungen 2" diff --git a/server/testgame/TestGame/Levels/SetTheory.lean b/server/testgame/TestGame/Levels/SetTheory.lean deleted file mode 100644 index 0f9a789..0000000 --- a/server/testgame/TestGame/Levels/SetTheory.lean +++ /dev/null @@ -1,43 +0,0 @@ -import TestGame.Levels.SetTheory.L01_Univ -import TestGame.Levels.SetTheory.L02_Empty -import TestGame.Levels.SetTheory.L03_Subset -import TestGame.Levels.SetTheory.L04_SubsetEmpty -import TestGame.Levels.SetTheory.L05_Empty -import TestGame.Levels.SetTheory.L06_Nonempty -import TestGame.Levels.SetTheory.L07_UnionInter -import TestGame.Levels.SetTheory.L08_UnionInter -import TestGame.Levels.SetTheory.L09_Complement -import TestGame.Levels.SetTheory.L10_Morgan -import TestGame.Levels.SetTheory.L11_SSubset -import TestGame.Levels.SetTheory.L12_Insert -import TestGame.Levels.SetTheory.L13_Insert -import TestGame.Levels.SetTheory.L14_SetOf -import TestGame.Levels.SetTheory.L15_Powerset -import TestGame.Levels.SetTheory.L16_Disjoint -import TestGame.Levels.SetTheory.L17_SetOf -import TestGame.Levels.SetTheory.L18_SetOf -import TestGame.Levels.SetTheory.L19_Subtype - - -Game "TestGame" -World "SetTheory" -Title "Mengenlehre" - -Introduction -"Der größere der beiden Monde sieht dunkelrot und karg aus. Trotzdem sollen dort nomadische -Gesellschaften wohnen, die sich in der Einöde zurechtfinden. - -Ihr steuert einen der wenigen befestigten Standorte am Fusse eines Berges an. - -**Robo**: Die Bevölkerung hier lebt so abgekapselt vom Rest des Universums, dass sie sich -vermutlich noch viel besser mit alter Sprache und Schrift auskennt. - -**Du**: Hoffen wir, dass sie uns weiterhelfen können dieses Buch der Urbilder zu entschlüsseln. - -Sofort begrüßt euch eine ältere Frau, die sich als *Mengitte*, die Beschützerin des Mondes, -vorstellt. -" - -Game "TestGame" -World "SetTheory2" -Title "Mehr Mengenlehre" diff --git a/server/testgame/TestGame/Levels/SetTheory/L01_Univ.lean b/server/testgame/TestGame/Levels/SetTheory/L01_Univ.lean deleted file mode 100644 index e46618c..0000000 --- a/server/testgame/TestGame/Levels/SetTheory/L01_Univ.lean +++ /dev/null @@ -1,60 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Init.Set -import Mathlib.Tactic.Tauto - -set_option tactic.hygienic false -set_option autoImplicit false - -Game "TestGame" -World "SetTheory" -Level 1 - -Title "Mengen" - -Introduction -" -**Mengitte**: Ich würde leider den Inhalt jenes Buches eh nicht verstehen. Aber der beste Weg für -euch, dieses zu entschlüsseln ist, euch ausgiebig mit der Bevölkerung hier zu unterhalten. -Lebt mit ihnen, redet mit ihnen und ihr werdet die Sprache automatisch lernen. - -**Mengitte**: Seit aber vorgewarnt, die Leute hier denken ganz viel über Mengen nach, -womit sie immer *homogene Mengen* meinen. Eine Menge natürlicher Zahlen `{1, 4, 6}` ist -verständlich, aber sowas wie eine Menge `{(2 : ℕ), {3, 1}, \"e\", (1 : ℂ)}` gibt es hier -einfach nicht. Punkt. - -**Robo**: Als Kontext: Wenn `A` ein beliebiger `Type` ist, dann ist `(U : Set A)` eine Menge -mit Elementen aus `A` - -**Mengitte**: Damit ich weiss, dass ihr euch grundsätzlich mit den Leuten austauschen könnt, -erklärt mir doch folgendes: -" - -open Set - -Statement mem_univ "" {A : Type} (x : A) : x ∈ (univ : Set A) := by - trivial - -Hint (A : Type) (x : A) : x ∈ (univ : Set A) => -"**Du**: Also `A` ist ein `Type`, `x` ist ein Element in `A`… - -**Robo** … und `univ` ist die Menge aller Elemente in `A`. - -**Du** ist das nicht einfach `A` selber? - -**Robo** Fast, aber das eine ist ein `Type`, das andere eine Menge, also vom Typ `Set A`. - -**Du**: Unlogisch. - -**Mengites**: Naja, Typen und Mengen sind halt zwei unterschiedliche Sachen und wenn ihr -über Mengen sprechen wollt, müssen alles Mengen sein. - -**Du**: Na gut. Und wieso `x ∈ univ` und nicht `x : univ` wie bei Typen? - -**Robo**: Jedes Element `(x : A)` hat entweder die Eigenschaft `x ∈ U` oder `x ∉ U` für eine -Menge `(U : Set A)`. (`\\in`, `\\nin`) - -**Du**: Also das ist ja dann trivial. Hoffentlich sehen die das hier auch so… -" - -Conclusion "**Mengitte**: Ja das stimmt schon. Dann wünsche ich euch viel Erfolg auf eurer Reise!" diff --git a/server/testgame/TestGame/Levels/SetTheory/L03_Subset.lean b/server/testgame/TestGame/Levels/SetTheory/L03_Subset.lean deleted file mode 100644 index a876537..0000000 --- a/server/testgame/TestGame/Levels/SetTheory/L03_Subset.lean +++ /dev/null @@ -1,45 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Init.Set -import Mathlib.Tactic.Tauto - -set_option tactic.hygienic false - -Game "TestGame" -World "SetTheory" -Level 3 - -Title "Teilmengen" - -Introduction -" -Hat man zwei Mengen `(A B : Set ℕ)` kann man fragen, ob diese Teilmengen -voneinander sind: `A ⊆ B` (`\\sub`/`\\ss`) ist die Notation für Teilmengen, die auch gleich -sein können. - -`A ⊆ B` ist als `∀ x, x ∈ A → x ∈ B` definiert, das heisst, ein `⊆` kann immer auch mit `intro x hx` -angegangen werden. - -Die Taktik `tauto` macht das automatisch, aber um dies zu lernen ist `tauto` hier deaktiviert. -Benutze also `intro`: -" - -namespace MySet - -open Set - --- theorem mem_univ {A : Type _} (x : A) : x ∈ (univ : Set A) := by --- trivial - --- theorem not_mem_empty {A : Type _} (x : A) : x ∉ (∅ : Set A) := by --- tauto - -Statement subset_empty_iff -"." (A : Set ℕ) : A ⊆ univ := by - intro h hA - trivial --apply mem_univ -- or `trivial`. - -NewTactic intro trivial apply --- blocked: tauto simp - -end MySet diff --git a/server/testgame/TestGame/Levels/Sum.lean b/server/testgame/TestGame/Levels/Sum.lean deleted file mode 100644 index 3ca27b5..0000000 --- a/server/testgame/TestGame/Levels/Sum.lean +++ /dev/null @@ -1,10 +0,0 @@ -import TestGame.Levels.Sum.L01_Simp -import TestGame.Levels.Sum.L02_Sum -import TestGame.Levels.Sum.L03_ArithSum -import TestGame.Levels.Sum.L04_SumOdd -import TestGame.Levels.Sum.L05_SumComm -import TestGame.Levels.Sum.L06_Summary - -Game "TestGame" -World "Sum" -Title "Endliche Summe" diff --git a/server/testgame/TestGame/Levels/Sum/L01_Simp.lean b/server/testgame/TestGame/Levels/Sum/L01_Simp.lean deleted file mode 100644 index d7970de..0000000 --- a/server/testgame/TestGame/Levels/Sum/L01_Simp.lean +++ /dev/null @@ -1,47 +0,0 @@ -import TestGame.Metadata - -import TestGame.Options.BigOperators - -set_option tactic.hygienic false - -Game "TestGame" -World "Sum" -Level 1 - -Title "Simp" - -Introduction -" -In diesem Kapitel lernen wir endliche Summen und mehr Übungen zur Induktion. - -Eine endliche Summe läuft erstmal immer über einen endlichen Index -`Fin n`, welcher $n$ Elemente -$\\{0, 1, \\ldots, n-1\\}$ beinhaltet. - -Der Syntax für $\\sum_{i=0}^n a_i$ ist `∑ i : Fin n, _` (\\sum) - -Als erstes kann die Taktik `simp` (für \"simplification\") ganz viel Triviales vereinfachen. -`simp` ist eine der stärksten Taktiken in Lean und verwendet -ganz viele markierte Lemmas um das Goal zu vereinfachen. - -Zum Beispiel kennt es ein Lemma das ungefähr so aussieht: - -``` -@[simp] -lemma sum_const_add (n : ℕ) : (∑ i in Fin n, 0) = 0 := by - sorry -``` - -Die Taktik `simp` benützt alle Lemmas, die mit `@[simp]` markiert sind. - -(Tipp: `simp?` zeigt an, welche Lemmas `simp` benutzen würde.) -" - -open BigOperators - -Statement -"Zeige $\\sum_{i = 0} ^ {n-1} (0 + 0) = 0$." - (n : ℕ) : (∑ i : Fin n, (0 + 0)) = 0 := by - simp - -NewTactic simp diff --git a/server/testgame/TestGame/Levels/Sum/L02_Sum.lean b/server/testgame/TestGame/Levels/Sum/L02_Sum.lean deleted file mode 100644 index 218187a..0000000 --- a/server/testgame/TestGame/Levels/Sum/L02_Sum.lean +++ /dev/null @@ -1,41 +0,0 @@ -import TestGame.Metadata - -import TestGame.Options.BigOperators -import Mathlib - -set_option tactic.hygienic false - -Game "TestGame" -World "Sum" -Level 2 - -Title "endliche Summe" - -Introduction -" -Generell sind aber nur solche Lemmas `@[simp]` markiert, klar eine Vereinfachung darstellen. - -So ist ein Lemma wie `Finset.sum_add_distrib` kein `simp`-Lemma, da beide Seiten je -nach Situation bevorzugt sein könnte: - -$$ - \\sum_{i = 0}^n a_i + b_i = \\sum_{i = 0}^n a_i + \\sum_{j = 0}^n b_j -$$ - -Dieses Lemma kann aber mit `rw` angewendet werden. -" - -open BigOperators - -Statement -"Zeige dass $\\sum_{i=0}^{n-1} (i + 1) = n + \\sum_{i=0}^{n-1} i$." - (n : ℕ) : ∑ i : Fin n, ((i : ℕ) + 1) = n + (∑ i : Fin n, (i : ℕ)) := by - rw [Finset.sum_add_distrib] - Hint "Die zweite Summe `∑ x : Fin n, 1` kann `simp` zu `n` vereinfacht werden." - simp - Hint "Bis auf Umordnung sind jetzt beide Seiten gleich, darum kann `ring` das Goal schließen. - - Alternativ kann man auch mit `rw [add_comm]` dies explizit umordnen." - ring - -NewLemma Finset.sum_add_distrib add_comm diff --git a/server/testgame/TestGame/Levels/Sum/L03_ArithSum.lean b/server/testgame/TestGame/Levels/Sum/L03_ArithSum.lean deleted file mode 100644 index fde2614..0000000 --- a/server/testgame/TestGame/Levels/Sum/L03_ArithSum.lean +++ /dev/null @@ -1,92 +0,0 @@ -import TestGame.Metadata - -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Ring - -import TestGame.Options.BigOperators - -set_option tactic.hygienic false - -Game "TestGame" -World "Sum" -Level 3 - -Title "Arithmetische Summe" - -Introduction -" -Oft beweist man Aussagen über Summen am besten per Induktion. - -Mit `induction n` startet man einen Induktionsbeweis. Dies erstellt 2 neue Goals: - -* **Induktionsanfang**: `n = 0`. Dieser kann ganz oft direkt mit `simp` bewiesen werden. -* **Induktionsschritt**: Man kriegt eine Annahme `(n_ih : P n)` und muss `P (n + 1)` - beweisen. Für endliche Summen will man normalerweise danach zuerst - `rw [Fin.sum_univ_castSucc]` brauchen, welches - $$\\sum_{i=0}^{n} a_i = \\sum_{i=0}^{n-1} a_i + a_n$$ - umschreibt. - -**Bemerkung:** - -Eine technische Sonderheit bezüglich endlichen Summen -ist der kleine Pfeil `↑` in `∑ i : Fin (n + 1), ↑i`. -Da `i : Fin n` technisch keine natürliche Zahl ist (sondern vom Typ `Fin n`), muss man -dieses zuerst mit `↑i` oder `(i : ℕ)` in eine natürliche Zahl umwandeln. Diese nennt man -*Coersion*. - -Gleichermassen, kommen hier im Induktionsschritt die Terme `↑(↑Fin.castSucc.toEmbedding i)` -und `↑(Fin.last (n + 1))` vor. Diese Terme können mit `simp` vereinfacht werden. -" - -open BigOperators - -Statement arithmetic_sum -"Zeige $2 \\cdot \\sum_{i = 0}^n i = n \\cdot (n + 1)$." - (n : ℕ) : 2 * (∑ i : Fin (n + 1), ↑i) = n * (n + 1) := by - induction n - simp - rw [Fin.sum_univ_castSucc] - rw [mul_add] - simp - rw [n_ih] - rw [Nat.succ_eq_add_one] - ring - -NewTactic induction -NewLemma Fin.sum_univ_castSucc Nat.succ_eq_add_one mul_add add_mul - -Hint (n : ℕ) : 2 * (∑ i : Fin (n + 1), ↑i) = n * (n + 1) => -"Als Erinnerung, einen Induktionsbeweis startet man mit `induction n`." - -Hint : 2 * ∑ i : Fin (Nat.zero + 1), ↑i = Nat.zero * (Nat.zero + 1) => -"Den Induktionsanker $n = 0$ kann `simp` oft beweisen." - -Hint (n : ℕ) (hn : 2 * ∑ i : Fin (n + 1), ↑i = n * (n + 1)) : - 2 * ∑ i : Fin (Nat.succ n + 1), ↑i = Nat.succ n * (Nat.succ n + 1) => -"Den Induktionsschritt beginnt man oft mit `rw [Fin.sum_univ_castSucc]`." - --- Hint (n : ℕ) (hn : 2 * ∑ i : Fin (n + 1), ↑i = n * (n + 1)) : --- 2 * (∑ i : Fin (n + 1), ↑(Fin.castSucc.toEmbedding i) + --- ↑(Fin.last (n + 1))) = Nat.succ n * (Nat.succ n + 1) => --- "Die Taktik `simp` vereinfacht `↑(↑Fin.castSucc.toEmbedding i)`. " - -Hint (n : ℕ) (hn : 2 * ∑ i : Fin (n + 1), ↑i = n * (n + 1)) : - 2 * (∑ x : Fin (n + 1), ↑x + (n + 1)) = Nat.succ n * (Nat.succ n + 1) => -"Um Die Induktionshypothese anzuwenden muss man noch -$$2 \\cdot ((\\sum_\{x=0}^n x) + (n + 1)) = 2 \\cdot \\sum_\{x=0}^n x + 2 \\cdot (n + 1))$$ -umschreiben. Dazu kannst du `mul_add` benützen. -" - -Hint (n : ℕ) (hn : 2 * ∑ i : Fin (n + 1), ↑i = n * (n + 1)) : - 2 * ∑ x : Fin (n + 1), ↑x + 2 * (n + 1) = Nat.succ n * (Nat.succ n + 1) => -"`simp` vereinfacht `↑(↑Fin.castSucc.toEmbedding i)` zu `↑i`. -Danach kann die Induktionshypothese mit `rw` angewendet werden." - -Hint (n : ℕ) (hn : 2 * ∑ i : Fin (n + 1), ↑i = n * (n + 1)) : - n * (n + 1) + 2 * (n + 1) = Nat.succ n * (Nat.succ n + 1) => -" -Im Moment muss man hier `ring` noch helfen, -indem man mit `rw [Nat.succ_eq_add_one]` zuerst `Nat.succ n = n + 1` umschreibt. - -(Dies wird irgendwann noch gefixt) -" diff --git a/server/testgame/TestGame/Levels/Sum/L04_SumOdd.lean b/server/testgame/TestGame/Levels/Sum/L04_SumOdd.lean deleted file mode 100644 index 640072a..0000000 --- a/server/testgame/TestGame/Levels/Sum/L04_SumOdd.lean +++ /dev/null @@ -1,58 +0,0 @@ -import TestGame.Metadata - -import TestGame.Options.BigOperators -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Ring - -Game "TestGame" -World "Sum" -Level 4 - -Title "Summe aller ungeraden Zahlen" - -Introduction -" -Hier nochmals eine Übung zur Induktion. -" -set_option tactic.hygienic false - -open BigOperators - -Statement odd_arithmetic_sum -"Zeige folgende Gleichung zur Summe aller ungeraden Zahlen: - -$\\sum_{i = 0}^n (2n + 1) = n ^ 2$." - (n : ℕ) : (∑ i : Fin n, (2 * (i : ℕ) + 1)) = n ^ 2 := by - induction' n with n hn - simp - rw [Fin.sum_univ_castSucc] - simp - rw [hn] - rw [Nat.succ_eq_add_one] - ring - -HiddenHint (n : ℕ) : (∑ i : Fin n, (2 * (i : ℕ) + 1)) = n ^ 2 => -" -Fange wieder mit `induction {n}` an. -" - -HiddenHint : ∑ i : Fin Nat.zero, ((2 : ℕ) * i + 1) = Nat.zero ^ 2 => -" -Den Induktionsanfang kannst du wieder mit `simp` beweisen. -" - -HiddenHint (n : ℕ) : ∑ i : Fin (Nat.succ n), ((2 : ℕ) * i + 1) = Nat.succ n ^ 2 => -" -Den Induktionsschritt startest du mit `rw [Fin.sum_univ_castSucc]`. -" - -HiddenHint (n : ℕ) (hn : ∑ i : Fin n, (2 * (i : ℕ) + 1) = n ^ 2) : - ∑ x : Fin n, (2 * (x : ℕ) + 1) + (2 * n + 1) = Nat.succ n ^ 2 => -" -Hier kommt die Induktionshypothese {hn} ins Spiel. -" - -HiddenHint (n : ℕ) : n ^ 2 + (2 * n + 1) = Nat.succ n ^ 2 => -" -Mit `rw [Nat.succ_eq_add_one]` und `ring` kannst du hier abschliessen. -" diff --git a/server/testgame/TestGame/Levels/Sum/L05_SumComm.lean b/server/testgame/TestGame/Levels/Sum/L05_SumComm.lean deleted file mode 100644 index 957104e..0000000 --- a/server/testgame/TestGame/Levels/Sum/L05_SumComm.lean +++ /dev/null @@ -1,36 +0,0 @@ -import TestGame.Metadata - -import TestGame.Options.BigOperators -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Ring - -import TestGame.Options.ArithSum - -set_option tactic.hygienic false - -open BigOperators - -Game "TestGame" -World "Sum" -Level 5 - -Title "Summe vertauschen" - -Introduction -" -Verschachtelte endliche Summen kann man beliebig tauschen. - -$$\\sum_{i=0}^n\\sum_{j=0}^m a_{ij} = \\sum_{j=0}^m\\sum_{i=0}^n a_{ij}$$ - -Dieses Lemma heisst `Finset.sum_comm` -" - - -Statement -"Zeige dass -$\\sum_{i=0}^n\\sum_{j=0}^m 2^i (1 + j) = \\sum_{j=0}^m\\sum_{i=0}^n 2^i (1 + j)$." - (n m : ℕ) : ∑ i : Fin n, ∑ j : Fin m, ( 2^i * (1 + j) : ℕ) = - ∑ j : Fin m, ∑ i : Fin n, ( 2^i * (1 + j) : ℕ) := by - rw [Finset.sum_comm] - -NewLemma Finset.sum_comm diff --git a/server/testgame/TestGame/Levels/Sum/L06_Summary.lean b/server/testgame/TestGame/Levels/Sum/L06_Summary.lean deleted file mode 100644 index 7657785..0000000 --- a/server/testgame/TestGame/Levels/Sum/L06_Summary.lean +++ /dev/null @@ -1,125 +0,0 @@ -import TestGame.Metadata - -import TestGame.Options.BigOperators -import Mathlib.Algebra.BigOperators.Fin -import Mathlib.Tactic.Ring - -import TestGame.ToBePorted -import TestGame.Options.ArithSum - -Game "TestGame" -World "Sum" -Level 6 - -set_option tactic.hygienic false - -Title "Zusammenfassung" - -Introduction -" -Zusammenfassung aus diesem Kapitel - -## Notationen / Begriffe - -| | Beschreibung | -|:---------------------|:------------------------------------------| -| `Fin n` | Ist ein Typ mit Zahlen $0, \\ldots, n-1$. | -| `∑ (i : Fin n), a i` | $\\sum_{i=0}^{n-1} a_i$ | - -## Taktiken - -| | Taktik | Beispiel | -|:---|:--------------------------|:-------------------------------------| -| 20 | `simp` | Simplifikation. | -| 21 | `induction n` | Induktion über $n$ | - -Und hier noch eine etwas schwierigere Übung. - -Das Resultat aus Level 3 kannst du als `arithmetic_sum` wiederverwenden: -$$ -2 \\cdot \\sum_{i = 0}^n i = n \\cdot (n + 1) -$$ -" - -open BigOperators - -Statement -"Zeige $\\sum_{i = 0}^m i^3 = (\\sum_{i = 0}^m i)^2$." - (m : ℕ) : (∑ i : Fin (m + 1), (i : ℕ)^3) = (∑ i : Fin (m + 1), (i : ℕ))^2 := by - induction' m with m hm - simp - rw [Fin.sum_univ_castSucc] - simp - rw [hm] - rw [Fin.sum_univ_castSucc (n := m + 1)] - simp - rw [add_pow_two] - rw [arithmetic_sum] - ring - -NewLemma arithmetic_sum add_pow_two - -HiddenHint (m : ℕ) : ∑ i : Fin (m + 1), (i : ℕ) ^ 3 = (∑ i : Fin (m + 1), ↑i) ^ 2 => -"Führe auch hier einen Induktionsbeweis." - -HiddenHint : ∑ i : Fin (Nat.zero + 1), (i : ℕ) ^ 3 = (∑ i : Fin (Nat.zero + 1), ↑i) ^ 2 => -"`simp` kann den Induktionsanfang beweisen." - -Hint (m : ℕ) : ∑ i : Fin (Nat.succ m + 1), (i : ℕ) ^ 3 = (∑ i : Fin (Nat.succ m + 1), ↑i) ^ 2 => -"Im Induktionsschritt willst du das Goal so umformen, dass du folgende Therme -ersetzen kannst: - -* `∑ i : Fin (m + 1), ↑i ^ 3` (Induktionshypothese) -* `2 * (∑ i : Fin (m + 1), ↑i)` (arithmetische Summe) -" - -HiddenHint (m : ℕ) : ∑ i : - Fin (Nat.succ m + 1), (i : ℕ) ^ 3 = (∑ i : Fin (Nat.succ m + 1), ↑i) ^ 2 => -" -Als erstes kannst du mal mit dem bekannten `rw [Fin.sum_univ_castSucc]` anfangen. -" - -HiddenHint (m : ℕ) : ∑ i : Fin (m + 1), (Fin.castSucc.toEmbedding i : ℕ) ^ 3 + - ↑(Fin.last (m + 1)) ^ 3 = (∑ i : Fin (Nat.succ m + 1), ↑i) ^ 2 => -"Mit `simp` kriegst du das `↑(Fin.castSucc.toEmbedding i)` weg" - -Hint (m : ℕ) : ∑ x : Fin (m + 1), (x : ℕ) ^ 3 + (m + 1) ^ 3 = - (∑ i : Fin (Nat.succ m + 1), ↑i) ^ 2 => -"Jetzt kannst du die Induktionshypothese benützen." - -Hint (m : ℕ) : (∑ i : Fin (m + 1), (i : ℕ)) ^ 2 + (m + 1) ^ 3 = (∑ i : Fin (Nat.succ m + 1), ↑i) ^ 2 => -"Die linke Seite ist jetzt erst mal gut. Um auf der rechten Seite `Fin.sum_univ_castSucc` -anzuwenden, haben wir ein Problem: Lean schreibt immer die erste Instanz um, also würde gerne -auf der linken Seite `(∑ i : Fin (m + 1), ↑i) ^ 2` umschreiben. - -Wir können Lean hier weiterhelfen, indem wir manche Argemente von `Fin.sum_univ_castSucc` -explizit angeben. Die Funktion hat ein Argument mit dem Namen `n`, welches wir z.B. explizit -angeben können: - -``` -rw [Fin.sum_univ_castSucc (n := m + 1)] -``` -" - -HiddenHint (m : ℕ) : (∑ i : Fin (m + 1), ↑i) ^ 2 + (m + 1) ^ 3 = - (∑ i : Fin (m + 1), ↑(Fin.castSucc.toEmbedding i) + ↑(Fin.last (m + 1))) ^ 2 => -"Wenn du noch einen AUsdruck `↑(Fin.castSucc.toEmbedding i)` hast, solltest du mal -`simp` aufrufen." - -Hint (m : ℕ) : (∑ i : Fin (m + 1), ↑i) ^ 2 + (m + 1) ^ 3 = (∑ i : Fin (m + 1), ↑i + (m + 1)) ^ 2 => -"Die rechte Seite hat die Form $(a + b)^2$ welche mit `add_pow_two` zu $a^2 + 2ab + b^2$ -umgeschrieben werden kann." - -HiddenHint (m : ℕ) : (∑ i : Fin (m + 1), ↑i) ^ 2 + (m + 1) ^ 3 = - (∑ i : Fin (m + 1), ↑i) ^ 2 + (2 * ∑ i : Fin (m + 1), ↑i) * (m + 1) + (m + 1) ^ 2 => -"Wenn du noch einen AUsdruck `↑(Fin.castSucc.toEmbedding i)` hast, solltest du mal -`simp` aufrufen." - -Hint (m : ℕ) : (∑ i : Fin (m + 1), ↑i) ^ 2 + (m + 1) ^ 3 = - (∑ i : Fin (m + 1), ↑i) ^ 2 + (2 * ∑ i : Fin (m + 1), ↑i) * (m + 1) + (m + 1) ^ 2 => -"Jetzt hast du in der Mitte `2 * ∑ i : Fin (m + 1), ↑i)`, welches du mit der -arithmetischen Summe `arithmetic_sum` umschreiben kannst." - -Hint (m : ℕ) : (∑ i : Fin (m + 1), ↑i) ^ 2 + (m + 1) ^ 3 = - (∑ i : Fin (m + 1), ↑i) ^ 2 + m * (m + 1) * (m + 1) + (m + 1) ^ 2 => -"Den Rest sollte `ring` für dich übernehmen." diff --git a/server/testgame/TestGame/MyNat.lean b/server/testgame/TestGame/MyNat.lean deleted file mode 100644 index 3cecede..0000000 --- a/server/testgame/TestGame/MyNat.lean +++ /dev/null @@ -1,19 +0,0 @@ -axiom MyNat : Type - ---notation "ℕ" => MyNat - ---axiom zero : ℕ - -axiom succ : ℕ → ℕ - -@[instance] axiom MyOfNat (n : Nat) : OfNat ℕ n - -@[instance] axiom myAddition : HAdd ℕ ℕ ℕ - -@[instance] axiom myMultiplication : HMul ℕ ℕ ℕ - -axiom add_zero : ∀ a : ℕ, a + 0 = a - -axiom add_succ : ∀ a b : ℕ, a + succ b = succ (a + b) - -@[elab_as_elim] axiom myInduction {P : ℕ → Prop} (n : ℕ) (h₀ : P 0) (h : ∀ n, P n → P (succ n)) : P n diff --git a/server/testgame/TestGame/Options/BigOperators.lean b/server/testgame/TestGame/Options/BigOperators.lean deleted file mode 100644 index 8a5f1c2..0000000 --- a/server/testgame/TestGame/Options/BigOperators.lean +++ /dev/null @@ -1,17 +0,0 @@ -import Mathlib.Algebra.BigOperators.Fin - -open BigOperators - -open Lean PrettyPrinter Delaborator SubExpr - -@[ delab app.Finset.sum] -def delabFinsetSum : Delab := do - guard $ (← getExpr).getAppNumArgs == 5 - guard $ ((← getExpr).getArg! 3).isAppOf' ``Finset.univ - guard $ ((← getExpr).getArg! 4).isLambda - withNaryArg 4 do - let α ← withBindingDomain delab - withBindingBodyUnusedName fun n => do - let n : TSyntax `ident := ⟨n⟩ - let b ← delab - `(∑ $n:ident : $α, $b) diff --git a/server/testgame/TestGame/TacticDocs.lean b/server/testgame/TestGame/TacticDocs.lean deleted file mode 100644 index 8bd7a6c..0000000 --- a/server/testgame/TestGame/TacticDocs.lean +++ /dev/null @@ -1,300 +0,0 @@ -import GameServer.Commands - -import TestGame.Tactics - -TacticDoc rfl -" -## Beschreibung - -`rfl` beweist ein Goal der Form `X = X`. - -## Detail - -`rfl` beweist jedes Goal `A = B` wenn `A` und `B` genau das gleiche sind. -Wichtig ist nicht, ob diese im Infoview gleich aussehen, sondern ob sie in -Lean gleich definiert sind. - -## Beispiel -`rfl` kann folgenes Goal beweisen: -``` -Objects - a b c : ℕ -Prove: - (a + b) * c = (a + b) * c -``` - -`rfl` kann auch folgendes beweisen: -``` -Objects - n : ℕ -Prove: - 1 + 1 = 2 -``` -denn Lean liest dies intern als `0.succ.succ = 0.succ.succ`. -" - -TacticDoc assumption -" -## Beschreibung - -`assumption` sucht nach einer Annahme, die genau dem Goal entspricht. - -## Beispiel -Wenn das Goal wie folgt aussieht: -``` -Objects - a b c d : ℕ - h : a + b = c - g : a * b = 16 - t : c = 12 -Prove: - a + b = c -``` - -dann findet `assumption` die Annahme `h`und schliesst den Beweis. -" - -TacticDoc rewrite -" -## Beschreibung - -Wie `rw` aber ruft `rfl` am Schluss nicht automatisch auf. -" - -TacticDoc induction -" -## Beschreibung - -Wie `rw` aber ruft `rfl` am Schluss nicht automatisch auf. -" - - -TacticDoc linarith -" -## Beschreibung - -" - -TacticDoc fin_cases -" -## Beschreibung - -" - -TacticDoc funext -" -## Beschreibung - -" - - -TacticDoc rw -" -## Beschreibung - -Wenn man eine Annahme `(h : X = Y)` hat, kann man mit -`rw [h]` alle `X` im Goal durch `Y` ersetzen. - -## Detail -- `rw [←h]` wendet `h` rückwärts an und ersetzt alle `Y` durch `X`. -- `rw [h, g, ←f]`: Man kann auch mehrere `rw` zusammenfassen. -- `rw [h] at h₂` ersetzt alle `X` in `h₂` zu `Y` (anstatt im Goal). - -`rw` funktioniert gleichermassen mit Annahmen `(h : X = Y)` also auch -mit Theoremen/Lemmas der Form `X = Y` - -## Beispiel - -TODO -" - -TacticDoc simp_rw -" -## Beschreibung - -TODO -" - -TacticDoc by_cases -" -## Beschreibung - -TODO -" - -TacticDoc apply -" -## Beschreibung - -TODO -" - -TacticDoc constructor -" -## Beschreibung - -TODO -" - -TacticDoc tauto -" -## Beschreibung - -TODO -" - -TacticDoc rcases -" -## Beschreibung - -TODO -" - -TacticDoc left -" -## Beschreibung - -TODO -" - -TacticDoc right -" -## Beschreibung - -TODO -" - -TacticDoc simp -" -## Beschreibung - -TODO -" - -TacticDoc trivial -" -## Beschreibung - -TODO -" - -TacticDoc contradiction -" -## Beschreibung - -TODO -" - -TacticDoc push_neg -" -## Beschreibung - -TODO -" - - -TacticDoc contrapose -" -## Beschreibung - -TODO -" - -TacticDoc revert -" -## Beschreibung - -TODO -" - - -TacticDoc by_contra -" -## Beschreibung - -TODO -" - -TacticDoc ring -" -## Beschreibung - -TODO -" - -TacticDoc unfold -" -## Beschreibung - -TODO -" - -TacticDoc use -" -## Beschreibung - -TODO -" - -TacticDoc «suffices» -" -## Beschreibung - -TODO -" - -TacticDoc «have» -" -## Beschreibung - -TODO -" - -TacticDoc «let» -" -## Beschreibung - -TODO -" - -TacticDoc induction_on -" -## Summary - -If `n : ℕ` is in our objects list, then `induction_on n` -attempts to prove the current goal by induction on `n`, with the inductive -assumption in the `succ` case being `ind_hyp`. - -### Example: -If your current goal is: -``` -Objects - n : ℕ -Prove: - 2 * n = n + n -``` - -then - -`induction_on n` - -will give us two goals: - -``` -Prove: - 2 * 0 = 0 + 0 -``` - -and -``` -Objects - n : ℕ, -Assumptions - ind_hyp : 2 * n = n + n -Prove: - 2 * succ n = succ n + succ n -``` -" - -TacticDoc intro -"Useful to introduce stuff"