math-exercises 3.0.202 → 3.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +1 -1
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.js +172 -51
- package/lib/exercises/math/geometry/angles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/angles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/index.js +1 -1
- package/lib/exercises/math/limits/index.d.ts +1 -5
- package/lib/exercises/math/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/limits/index.js +1 -5
- package/lib/exercises/math/limits/limitReading.d.ts.map +1 -1
- package/lib/exercises/math/limits/limitReading.js +70 -0
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +55 -4
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +35 -2
- package/lib/exercises/math/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceGeometricLimit.js +45 -9
- package/lib/exercises/math/limits/sequencePolynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomLimit.js +56 -3
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +32 -0
- package/lib/exercises/math/limits/sequencePolynomProductLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomProductLimit.js +33 -3
- package/lib/exercises/math/limits/sequenceRationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceRationalFracLimit.js +2 -2
- package/lib/exercises/math/limits/sequences/index.d.ts +6 -0
- package/lib/exercises/math/limits/sequences/index.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/index.js +5 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.d.ts +9 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.js +110 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.d.ts +7 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.js +116 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.d.ts +7 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.js +95 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.d.ts +8 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.js +111 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.d.ts +8 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.js +114 -0
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +1 -0
- package/lib/exercises/math/sequences/proofByInduction/index.d.ts +5 -0
- package/lib/exercises/math/sequences/proofByInduction/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/index.js +4 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.d.ts +10 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.js +236 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.js +244 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.d.ts +98 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.js +175 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.js +317 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.js +265 -0
- package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -1
- package/lib/exercises/vea/polynomialVEA.js +4 -0
- package/lib/index.d.ts +49 -13
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +1 -1
- package/lib/math/utils/functions/functionDecomposition.d.ts +2 -2
- package/lib/math/utils/functions/functionDecomposition.d.ts.map +1 -1
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +7 -11
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +7 -3
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/node.d.ts +2 -1
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +1 -0
- package/lib/tree/nodes/student/iDontKnowNode.d.ts +26 -0
- package/lib/tree/nodes/student/iDontKnowNode.d.ts.map +1 -0
- package/lib/tree/nodes/student/iDontKnowNode.js +63 -0
- package/lib/tree/parsers/latexParser.d.ts +3 -2
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +7 -0
- package/lib/tree/parsers/monomParser.d.ts +1 -1
- package/lib/tree/parsers/monomParser.d.ts.map +1 -1
- package/lib/tree/parsers/polynomialParser.d.ts +1 -1
- package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
- package/lib/tree/parsers/trinomParser.d.ts +1 -1
- package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.d.ts +3 -1
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +63 -5
- package/package.json +1 -1
package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.js
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { tryToAddWrongProp, addValidProp, shuffleProps, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { nodeBySubstitutingVar } from "../../../../math/utils/functions/functionComposition.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { EqualNode, isEqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
7
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
9
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
10
|
+
import { NodeComparator } from "../../../../tree/utilities/nodeComparator.js";
|
|
11
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
12
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
13
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
14
|
+
import { getArrProofByInductionSituationParams, getHydratedProofByInductionSituation, } from "./proofByInductionSituations.js";
|
|
15
|
+
import { getCartesiansProducts } from "../../../../utils/arrays/cartesianProducts.js";
|
|
16
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
17
|
+
const getHydrated = (identifiers) => {
|
|
18
|
+
const { situationParams, isValid, indexForNodeProperty, nodeIdsVarStepDefinition, nodeIdsVarStepInduction, } = identifiers;
|
|
19
|
+
const situation = getHydratedProofByInductionSituation(situationParams);
|
|
20
|
+
const [nodeVarStepDefinition, nodeVarStepInduction] = [
|
|
21
|
+
nodeIdsVarStepDefinition,
|
|
22
|
+
nodeIdsVarStepInduction,
|
|
23
|
+
].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
24
|
+
switch (situation.id) {
|
|
25
|
+
case "generalFormulaOfArithmeticoGeometricSequence": {
|
|
26
|
+
const nodePropertyWithN = (isValid ? situation.arrNodeValid : situation.arrNodeInvalid)[indexForNodeProperty];
|
|
27
|
+
function createNodePropertySubstituted(nodeInjected) {
|
|
28
|
+
return nodeBySubstitutingVar(nodeBySubstitutingVar(nodePropertyWithN, nodeInjected, new VariableNode("n")), new VariableNode(`u_{${nodeInjected.toTex()}}`), new VariableNode("u_{n}"));
|
|
29
|
+
}
|
|
30
|
+
const [nodePropertyDefinition, nodePropertyDefinitionPlus1, nodePropertyInduction, nodePropertyInductionPlus1,] = [
|
|
31
|
+
nodeVarStepDefinition,
|
|
32
|
+
add(nodeVarStepDefinition, 1),
|
|
33
|
+
nodeVarStepInduction,
|
|
34
|
+
add(nodeVarStepInduction, 1),
|
|
35
|
+
].map((node) => createNodePropertySubstituted(node));
|
|
36
|
+
return {
|
|
37
|
+
situation,
|
|
38
|
+
isValid,
|
|
39
|
+
nodeVarStepDefinition,
|
|
40
|
+
nodePropertyDefinition,
|
|
41
|
+
nodePropertyDefinitionPlus1,
|
|
42
|
+
nodeVarStepInduction,
|
|
43
|
+
nodePropertyInduction,
|
|
44
|
+
nodePropertyInductionPlus1,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
default:
|
|
48
|
+
throw new Error("Unsupported situation.id: " + situation.id);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const getInstruction = (identifiers) => {
|
|
52
|
+
const { situation, nodePropertyDefinition, nodeVarStepDefinition, nodeVarStepInduction, } = getHydrated(identifiers);
|
|
53
|
+
const { n0 } = situation;
|
|
54
|
+
switch (situation.id) {
|
|
55
|
+
case "generalFormulaOfArithmeticoGeometricSequence": {
|
|
56
|
+
return `${situation.strContext}
|
|
57
|
+
|
|
58
|
+
Pour $${nodeVarStepDefinition.toTex()} \\geq ${n0}$, on note $\\mathcal{P}(${nodeVarStepDefinition.toTex()})$ la propriété :
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
\\mathcal{P}(${nodeVarStepDefinition.toTex()}) :\\ \\ ${nodePropertyDefinition.toTex()}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
Soit $${nodeVarStepInduction.toTex()}$ un entier tel que $${nodeVarStepInduction.toTex()} \\geq ${n0}$.
|
|
65
|
+
On suppose la propriété $\\mathcal{P}(${nodeVarStepInduction.toTex()})$ vraie.
|
|
66
|
+
|
|
67
|
+
Quelle est l'égalité qui correspond à la propriété $\\mathcal{P}(${add(nodeVarStepInduction, 1).toTex()})$ ?
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
default:
|
|
71
|
+
throw new Error("Unsupported situation.id: " + situation.id);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const getAnswer = (identifiers) => {
|
|
75
|
+
const { nodePropertyInductionPlus1 } = getHydrated(identifiers);
|
|
76
|
+
return nodePropertyInductionPlus1.toTex();
|
|
77
|
+
};
|
|
78
|
+
const getHint = (identifiers) => {
|
|
79
|
+
const { nodeIdsVarStepInduction } = identifiers;
|
|
80
|
+
const [nodeVarStepInduction] = [nodeIdsVarStepInduction].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
81
|
+
return `Substitue $${nodeVarStepInduction.toTex()}$ par $${add(nodeVarStepInduction, 1).toTex()}$ dans l'égalité proposée.`;
|
|
82
|
+
};
|
|
83
|
+
const getCorrection = (identifiers) => {
|
|
84
|
+
const { situation, nodePropertyInductionPlus1, nodeVarStepInduction } = getHydrated(identifiers);
|
|
85
|
+
switch (situation.id) {
|
|
86
|
+
case "generalFormulaOfArithmeticoGeometricSequence": {
|
|
87
|
+
return `Pour vérifier que la propriété est héréditaire,
|
|
88
|
+
il faut démontrer que si on suppose $\\mathcal{P}(${nodeVarStepInduction.toTex()})$ vraie alors $\\mathcal{P}(${add(nodeVarStepInduction, 1).toTex()})$ est vraie.
|
|
89
|
+
|
|
90
|
+
On s'intéresse donc à $\\mathcal{P}(${add(nodeVarStepInduction, 1).toTex()})$,
|
|
91
|
+
autrement dit à l'égalité :
|
|
92
|
+
|
|
93
|
+
$$
|
|
94
|
+
${nodePropertyInductionPlus1.toTex()}
|
|
95
|
+
$$
|
|
96
|
+
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
default:
|
|
100
|
+
throw new Error("Unsupported situation.id: " + situation.id);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
104
|
+
const propositions = [];
|
|
105
|
+
addValidProp(propositions, answer);
|
|
106
|
+
const { nodePropertyDefinition, nodePropertyDefinitionPlus1, nodePropertyInduction, nodePropertyInductionPlus1, } = getHydrated(identifiers);
|
|
107
|
+
tryToAddWrongProp(propositions, nodePropertyDefinitionPlus1.toTex());
|
|
108
|
+
const [arrLhs, arrRhs] = [0, 1].map((i) => [
|
|
109
|
+
nodePropertyDefinition,
|
|
110
|
+
nodePropertyInduction,
|
|
111
|
+
nodePropertyInductionPlus1,
|
|
112
|
+
nodePropertyDefinitionPlus1,
|
|
113
|
+
].map((equalNode) => i === 0 ? equalNode.leftChild : equalNode.rightChild));
|
|
114
|
+
const arrEqualNode = shuffle(getCartesiansProducts([arrLhs, arrRhs]).map(([nodeLhs, nodeRhs]) => new EqualNode(nodeLhs, nodeRhs)));
|
|
115
|
+
propWhile(propositions, n, () => {
|
|
116
|
+
const equalNodeWrong = arrEqualNode.pop();
|
|
117
|
+
tryToAddWrongProp(propositions, equalNodeWrong.toTex());
|
|
118
|
+
});
|
|
119
|
+
return shuffleProps(propositions, n);
|
|
120
|
+
};
|
|
121
|
+
const getKeys = (identifiers) => {
|
|
122
|
+
const { nodeIdsVarStepDefinition, nodeIdsVarStepInduction } = identifiers;
|
|
123
|
+
const [nodeVarStepDefinition, nodeVarStepInduction] = [
|
|
124
|
+
nodeIdsVarStepDefinition,
|
|
125
|
+
nodeIdsVarStepInduction,
|
|
126
|
+
].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
127
|
+
const arrLetter = [nodeVarStepDefinition, nodeVarStepInduction].map((nodeVar) => nodeVar.name);
|
|
128
|
+
return ["u", ...arrLetter, "underscore", "equal"];
|
|
129
|
+
};
|
|
130
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
131
|
+
try {
|
|
132
|
+
//TODO faire fonctionner parseAlgebraic("u_n=3+2n") (token _ not implemented)
|
|
133
|
+
const nodeAnswer = getHydrated(identifiers)
|
|
134
|
+
.nodePropertyInductionPlus1;
|
|
135
|
+
if (!ans.includes("=")) {
|
|
136
|
+
// return false;
|
|
137
|
+
ans = nodeAnswer.leftChild.toTex() + "=" + ans;
|
|
138
|
+
}
|
|
139
|
+
// const nodeAns = parseAlgebraic(ans);
|
|
140
|
+
const nodeAns = (() => {
|
|
141
|
+
const [lhs, rhs] = ans.split("=");
|
|
142
|
+
const nodeLhs = lhs.toTree();
|
|
143
|
+
const nodeRhs = parseAlgebraic(rhs);
|
|
144
|
+
return new EqualNode(nodeLhs, nodeRhs);
|
|
145
|
+
})();
|
|
146
|
+
if (!isEqualNode(nodeAns)) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
const isValidLhs = () => nodeAns.leftChild.toTex() === nodeAnswer.leftChild.toTex();
|
|
150
|
+
const isValidRhs = () => {
|
|
151
|
+
const nodeAnsRhs = nodeAns.rightChild;
|
|
152
|
+
const nodeAnswerRhs = nodeAnswer.rightChild;
|
|
153
|
+
const { nodeIdsVarStepInduction } = identifiers;
|
|
154
|
+
const [nodeVarStepInduction] = [nodeIdsVarStepInduction].map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
155
|
+
return NodeComparator.isEqualViaRandomEvaluations(nodeAnsRhs, nodeAnswerRhs, 3, 6, nodeVarStepInduction, () => randint(0, 20));
|
|
156
|
+
};
|
|
157
|
+
return isValidLhs() && isValidRhs();
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
handleVEAError(e);
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const createRandomIdentifiers = () => {
|
|
165
|
+
const [situationParams] = getArrProofByInductionSituationParams([
|
|
166
|
+
"generalFormulaOfArithmeticoGeometricSequence",
|
|
167
|
+
]);
|
|
168
|
+
const situation = getHydratedProofByInductionSituation(situationParams);
|
|
169
|
+
const [isValid, indexForNodeProperty] = (() => {
|
|
170
|
+
switch (situation.id) {
|
|
171
|
+
case "generalFormulaOfArithmeticoGeometricSequence": {
|
|
172
|
+
const isValid = coinFlip();
|
|
173
|
+
const indexForNodeProperty = randint(0, isValid
|
|
174
|
+
? situation.arrNodeValid.length
|
|
175
|
+
: situation.arrNodeInvalid.length);
|
|
176
|
+
return [isValid, indexForNodeProperty];
|
|
177
|
+
}
|
|
178
|
+
default:
|
|
179
|
+
throw new Error("Unsupported situation.id: " + situation.id);
|
|
180
|
+
}
|
|
181
|
+
})();
|
|
182
|
+
const [nodeVarStepDefinition, nodeVarStepInduction] = randomMany(["n", "k", "p", "m"], 2).map((letter) => new VariableNode(letter));
|
|
183
|
+
const identifiers = {
|
|
184
|
+
situationParams,
|
|
185
|
+
isValid,
|
|
186
|
+
indexForNodeProperty,
|
|
187
|
+
nodeIdsVarStepDefinition: nodeVarStepDefinition.toIdentifiers(),
|
|
188
|
+
nodeIdsVarStepInduction: nodeVarStepInduction.toIdentifiers(),
|
|
189
|
+
};
|
|
190
|
+
return identifiers;
|
|
191
|
+
};
|
|
192
|
+
// const isIdentifiersQCPassed = (identifiers: Identifiers) => {
|
|
193
|
+
// const isExploding = (identifiers: Identifiers) => {
|
|
194
|
+
// let isExploding = false;
|
|
195
|
+
// try {
|
|
196
|
+
// getAnswer(identifiers);
|
|
197
|
+
// } catch (_) {
|
|
198
|
+
// isExploding = true;
|
|
199
|
+
// }
|
|
200
|
+
// return isExploding;
|
|
201
|
+
// };
|
|
202
|
+
// return !isExploding(identifiers);
|
|
203
|
+
// };
|
|
204
|
+
// const createQCPassedIdentifiers = () => {
|
|
205
|
+
// let identifiers: Identifiers;
|
|
206
|
+
// let counter = -1;
|
|
207
|
+
// let isValid = false;
|
|
208
|
+
// while (!isValid && counter < 100) {
|
|
209
|
+
// counter++;
|
|
210
|
+
// const identifiersCandidate = createRandomIdentifiers();
|
|
211
|
+
// isValid = isIdentifiersQCPassed(identifiersCandidate);
|
|
212
|
+
// if (isValid) {
|
|
213
|
+
// identifiers = identifiersCandidate;
|
|
214
|
+
// }
|
|
215
|
+
// }
|
|
216
|
+
// if (!isValid) {
|
|
217
|
+
// const [situationParams] = getArrProofByInductionSituationParams([
|
|
218
|
+
// "generalFormulaOfArithmeticoGeometricSequence",
|
|
219
|
+
// ]);
|
|
220
|
+
// const [nodeVarStepDefinition, nodeVarStepInduction] = randomMany(
|
|
221
|
+
// ["n", "k", "p", "m"],
|
|
222
|
+
// 2,
|
|
223
|
+
// ).map((letter) => new VariableNode(letter));
|
|
224
|
+
// const identifiersDefault: Identifiers = (() => {
|
|
225
|
+
// return {
|
|
226
|
+
// situationParams,
|
|
227
|
+
// isValid: true,
|
|
228
|
+
// indexForNodeProperty: 0,
|
|
229
|
+
// nodeIdsVarStepDefinition: nodeVarStepDefinition.toIdentifiers(),
|
|
230
|
+
// nodeIdsVarStepInduction: nodeVarStepInduction.toIdentifiers(),
|
|
231
|
+
// };
|
|
232
|
+
// })();
|
|
233
|
+
// identifiers = identifiersDefault;
|
|
234
|
+
// }
|
|
235
|
+
// return identifiers!;
|
|
236
|
+
// };
|
|
237
|
+
const getProofByInductionWritePropAtRankKPlus1Question = () => {
|
|
238
|
+
const identifiers = createRandomIdentifiers();
|
|
239
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
240
|
+
};
|
|
241
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
242
|
+
return {
|
|
243
|
+
answer: getAnswer(identifiers),
|
|
244
|
+
instruction: getInstruction(identifiers),
|
|
245
|
+
keys: getKeys(identifiers),
|
|
246
|
+
answerFormat: "tex",
|
|
247
|
+
identifiers,
|
|
248
|
+
hint: getHint(identifiers),
|
|
249
|
+
correction: getCorrection(identifiers),
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
export const proofByInductionWritePropAtRankKPlus1 = {
|
|
253
|
+
id: "proofByInductionWritePropAtRankKPlus1",
|
|
254
|
+
connector: "=",
|
|
255
|
+
label: "Hérédité : Écrire au rang $k+1$ une propriété donnée au rang $k$",
|
|
256
|
+
isSingleStep: true,
|
|
257
|
+
generator: (nb, opts) => getDistinctQuestions(() => getProofByInductionWritePropAtRankKPlus1Question(opts), nb),
|
|
258
|
+
qcmTimer: 60,
|
|
259
|
+
freeTimer: 60,
|
|
260
|
+
isAnswerValid,
|
|
261
|
+
getPropositions,
|
|
262
|
+
subject: "Mathématiques",
|
|
263
|
+
getQuestionFromIdentifiers,
|
|
264
|
+
hasHintAndCorrection: true,
|
|
265
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomialVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/polynomialVEA.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"polynomialVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/polynomialVEA.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,YAuBxD,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { getArrNodeCoeffOfPolynomialNode } from "../../math/utils/polynomial/polynomialUtils.js";
|
|
2
2
|
import { substract } from "../../tree/nodes/operators/substractNode.js";
|
|
3
|
+
import { isIDontKnowNode } from "../../tree/nodes/student/iDontKnowNode.js";
|
|
3
4
|
import { parseAlgebraic } from "../../tree/parsers/latexParser.js";
|
|
4
5
|
import { zip } from "../../utils/arrays/arrayZip.js";
|
|
5
6
|
import { handleVEAError } from "../../utils/errors/handleVEAError.js";
|
|
6
7
|
export const polynomialVEA = (ans, answer) => {
|
|
7
8
|
try {
|
|
8
9
|
const nodeAns = parseAlgebraic(ans);
|
|
10
|
+
if (isIDontKnowNode(nodeAns)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
9
13
|
const nodeAnswer = parseAlgebraic(answer);
|
|
10
14
|
const [arrNodeCoeffAns, arrNodeCoeffAnswer] = [nodeAns, nodeAnswer].map((node) => getArrNodeCoeffOfPolynomialNode(node));
|
|
11
15
|
return (arrNodeCoeffAns.length === arrNodeCoeffAnswer.length &&
|
package/lib/index.d.ts
CHANGED
|
@@ -2857,6 +2857,20 @@ declare const mathExercises: (Exercise<{
|
|
|
2857
2857
|
doubleAngle: number;
|
|
2858
2858
|
singleAngle: number;
|
|
2859
2859
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2860
|
+
isParallel: boolean;
|
|
2861
|
+
angleType: "alternes-internes" | "correspondants" | "alternes-externes" | "autres";
|
|
2862
|
+
arrIntersectionIds: {
|
|
2863
|
+
center: import("./math/geometry/point.js").PointIdentifiers;
|
|
2864
|
+
lineH: import("./math/geometry/line.js").LineIdentifiers;
|
|
2865
|
+
lineV: import("./math/geometry/line.js").LineIdentifiers;
|
|
2866
|
+
}[];
|
|
2867
|
+
arrAngleIndex: number[];
|
|
2868
|
+
arrAngleForLabel: number[] | undefined;
|
|
2869
|
+
}, {
|
|
2870
|
+
angleTypes: ("alternes-internes" | "correspondants" | "alternes-externes" | "autres")[];
|
|
2871
|
+
isFakeDisplay: boolean;
|
|
2872
|
+
nbDigits: "0" | "1" | "2";
|
|
2873
|
+
}> | Exercise<{
|
|
2860
2874
|
lines: {
|
|
2861
2875
|
pointA: number[];
|
|
2862
2876
|
pointB: number[];
|
|
@@ -3014,19 +3028,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3014
3028
|
limitTo: "+\\infty" | "-\\infty";
|
|
3015
3029
|
numCoeffs: number[];
|
|
3016
3030
|
denumCoeffs: number[];
|
|
3017
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3018
|
-
reason: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3019
|
-
firstTerm: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3020
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3021
|
-
coeffs: number[];
|
|
3022
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3023
|
-
coeffs: number[];
|
|
3024
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3025
|
-
polyNumCoeffs: number[];
|
|
3026
|
-
polyDenumCoeffs: number[];
|
|
3027
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3028
|
-
numCoeffs: number[];
|
|
3029
|
-
denumCoeffs: number[];
|
|
3030
3031
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3031
3032
|
type: number;
|
|
3032
3033
|
to: string;
|
|
@@ -3048,6 +3049,19 @@ declare const mathExercises: (Exercise<{
|
|
|
3048
3049
|
nodeIdsLimitAbscissa: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3049
3050
|
nodeIdsP: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3050
3051
|
isPossible: boolean;
|
|
3052
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3053
|
+
reason: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3054
|
+
firstTerm: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3055
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3056
|
+
coeffs: number[];
|
|
3057
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3058
|
+
coeffs: number[];
|
|
3059
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3060
|
+
polyNumCoeffs: number[];
|
|
3061
|
+
polyDenumCoeffs: number[];
|
|
3062
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3063
|
+
numCoeffs: number[];
|
|
3064
|
+
denumCoeffs: number[];
|
|
3051
3065
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3052
3066
|
a: string;
|
|
3053
3067
|
b: string;
|
|
@@ -4100,6 +4114,28 @@ declare const mathExercises: (Exercise<{
|
|
|
4100
4114
|
type: number;
|
|
4101
4115
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4102
4116
|
coeffs: number[];
|
|
4117
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4118
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4119
|
+
isValid: boolean;
|
|
4120
|
+
indexForNodeProperty: number;
|
|
4121
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4122
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4123
|
+
isValid: boolean;
|
|
4124
|
+
indexForNodeProperty: number;
|
|
4125
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4126
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4127
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4128
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4129
|
+
isValid: boolean;
|
|
4130
|
+
indexForNodeProperty: number;
|
|
4131
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4132
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4133
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4134
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4135
|
+
isValid: boolean;
|
|
4136
|
+
indexForNodeProperty: number;
|
|
4137
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4138
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4103
4139
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4104
4140
|
intervalIdentifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
4105
4141
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACp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, isVisible = true, } = {}) {
|
|
162
162
|
const commands = [
|
|
163
|
-
`${this.name} = (${this.x.toMathString()}, ${this.y.toMathString()})`,
|
|
163
|
+
`${this.name} = Point({${this.x.toMathString()}, ${this.y.toMathString()}})`,
|
|
164
164
|
`SetFixed(${this.name},${isFixed ? "true" : "false"},${isSelectionnable ? "true" : "false"})`,
|
|
165
165
|
`ShowLabel(${this.name},${showLabel ? "true" : "false"})`,
|
|
166
166
|
];
|
|
@@ -4,7 +4,7 @@ export declare const functionDecompositions: (node: AlgebraicNode, variableNode?
|
|
|
4
4
|
nodeU: AlgebraicNode;
|
|
5
5
|
nodeV: AlgebraicNode;
|
|
6
6
|
}[];
|
|
7
|
-
export declare const nodeBySubstitutingX: (node: AlgebraicNode, strVar: string) => AlgebraicNode;
|
|
8
|
-
export declare function composeNodes(nodeU: AlgebraicNode, nodeV: AlgebraicNode): AlgebraicNode;
|
|
7
|
+
export declare const nodeBySubstitutingX: (node: AlgebraicNode, strVar: string) => AlgebraicNode | import("../../../tree/nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
8
|
+
export declare function composeNodes(nodeU: AlgebraicNode, nodeV: AlgebraicNode): AlgebraicNode | import("../../../tree/nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
9
9
|
export declare function isContainingFacetiousFrac(node: AlgebraicNode): boolean;
|
|
10
10
|
//# sourceMappingURL=functionDecomposition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionDecomposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionDecomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAYlE,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AAcpD,eAAO,MAAM,sBAAsB,GACjC,MAAM,aAAa,EACnB,eAAc,YAA2C;WAElC,aAAa;WAAS,aAAa;GAyO3D,CAAC;AAqEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,EAAE,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"functionDecomposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionDecomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAYlE,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AAcpD,eAAO,MAAM,sBAAsB,GACjC,MAAM,aAAa,EACnB,eAAc,YAA2C;WAElC,aAAa;WAAS,aAAa;GAyO3D,CAAC;AAqEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,EAAE,QAAQ,MAAM,yFAItE,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,wFAMtE;AAMD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAmBtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,6BAA6B,CAAC;AAI5E,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,6BAA6B,CAAC;AAI5E,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;CA4H5C,CAAC"}
|
package/lib/tests/exoTest.js
CHANGED
|
@@ -32,16 +32,11 @@ export const exoTest = (exo) => {
|
|
|
32
32
|
const questions = exo.generator(30);
|
|
33
33
|
const after = Date.now();
|
|
34
34
|
generatorTime = after - before;
|
|
35
|
-
if (exo.answerType
|
|
36
|
-
exo.
|
|
37
|
-
exo.
|
|
38
|
-
|
|
39
|
-
exo.
|
|
40
|
-
exo.answerType !== "treeDiagram" &&
|
|
41
|
-
exo.answerType !== "signVarTable") {
|
|
42
|
-
if (!exo.getPropositions)
|
|
43
|
-
throw new Error(`exo ${exo.id} has no getPropositions`);
|
|
44
|
-
}
|
|
35
|
+
if ((exo.answerType === "QCU" || exo.answerType === "QCM") &&
|
|
36
|
+
!exo.getPropositions)
|
|
37
|
+
throw new Error(`exo ${exo.id} has no getPropositions`);
|
|
38
|
+
if (exo.answerType === "reorder" && !exo.getOrderedItems)
|
|
39
|
+
throw new Error(`exo ${exo.id} has no getOrderedItems`);
|
|
45
40
|
if (exo.answerType !== "QCM" &&
|
|
46
41
|
exo.answerType !== "QCU" &&
|
|
47
42
|
exo.answerType !== "GGB" &&
|
|
@@ -49,7 +44,8 @@ export const exoTest = (exo) => {
|
|
|
49
44
|
exo.answerType !== "varTable" &&
|
|
50
45
|
exo.answerType !== "signTable" &&
|
|
51
46
|
exo.answerType !== "treeDiagram" &&
|
|
52
|
-
exo.answerType !== "signVarTable"
|
|
47
|
+
exo.answerType !== "signVarTable" &&
|
|
48
|
+
exo.answerType !== "reorder") {
|
|
53
49
|
if (!exo.isAnswerValid)
|
|
54
50
|
throw new Error(`exo ${exo.id} has no isAnswerValid`);
|
|
55
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA0BjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA0BjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CA6V3B,CAAC"}
|
|
@@ -106,7 +106,9 @@ export const questionTest = (exo, question) => {
|
|
|
106
106
|
if (!question.initTreeTable.some((stage) => stage.some((block) => block.some((branch) => branch.some((cell) => cell === "")))))
|
|
107
107
|
throw new Error(`exo ${exo.id} is answertype treeDiagram but no input in treeTable`);
|
|
108
108
|
}
|
|
109
|
-
else if (exo.answerType !== "QCU" &&
|
|
109
|
+
else if (exo.answerType !== "QCU" &&
|
|
110
|
+
exo.answerType !== "QCM" &&
|
|
111
|
+
exo.answerType !== "reorder") {
|
|
110
112
|
if (!question.answer)
|
|
111
113
|
throw new Error(`exo ${exo.id} has no answer`);
|
|
112
114
|
}
|
|
@@ -198,7 +200,8 @@ export const questionTest = (exo, question) => {
|
|
|
198
200
|
exo.answerType !== "signTable" &&
|
|
199
201
|
exo.answerType !== "varTable" &&
|
|
200
202
|
exo.answerType !== "signVarTable" &&
|
|
201
|
-
exo.answerType !== "treeDiagram"
|
|
203
|
+
exo.answerType !== "treeDiagram" &&
|
|
204
|
+
exo.answerType !== "reorder") {
|
|
202
205
|
if (!question.keys)
|
|
203
206
|
throw new Error(`exo ${exo.id} has no keys`);
|
|
204
207
|
const answer = question.answer;
|
|
@@ -219,7 +222,8 @@ export const questionTest = (exo, question) => {
|
|
|
219
222
|
exo.answerType !== "varTable" &&
|
|
220
223
|
exo.answerType !== "signTable" &&
|
|
221
224
|
exo.answerType !== "signVarTable" &&
|
|
222
|
-
exo.answerType !== "treeDiagram"
|
|
225
|
+
exo.answerType !== "treeDiagram" &&
|
|
226
|
+
exo.answerType !== "reorder") {
|
|
223
227
|
if (exo.answerType === "QCM" && !exo.isQCM)
|
|
224
228
|
throw new Error("exo " + exo.id + " has answerType QCM but not isQCM");
|
|
225
229
|
const before = Date.now();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleExo.test.d.ts","sourceRoot":"","sources":["../../src/tests/singleExo.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleExo.test.d.ts","sourceRoot":"","sources":["../../src/tests/singleExo.test.ts"],"names":[],"mappings":"AAEA,OAAO,6BAA6B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../prototypesEnhancement.js";
|
|
2
2
|
import { exoTest } from "./exoTest.js";
|
|
3
|
-
import {
|
|
3
|
+
import { proofByInductionCheckInitialization, } from "../exercises/math/index.js";
|
|
4
4
|
try {
|
|
5
5
|
for (let i = 0; i < 1000; i++)
|
|
6
|
-
exoTest(
|
|
6
|
+
exoTest(proofByInductionCheckInitialization);
|
|
7
7
|
}
|
|
8
8
|
catch (err) {
|
|
9
9
|
throw err;
|
package/lib/tree/nodes/node.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;IACV,KAAK,IAAA;IACL,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,MAAM,KAAA;IACN,GAAG,KAAA;IACH,MAAM,KAAA;IACN,KAAK,KAAA;IACL,OAAO,KAAA;IACP,WAAW,KAAA;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;IACV,KAAK,IAAA;IACL,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,MAAM,KAAA;IACN,GAAG,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AAY,KAAK,MAAM,CAAC;IAEvC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5D"}
|
package/lib/tree/nodes/node.js
CHANGED
|
@@ -18,6 +18,7 @@ export var NodeType;
|
|
|
18
18
|
NodeType[NodeType["monom"] = 13] = "monom";
|
|
19
19
|
NodeType[NodeType["complex"] = 14] = "complex";
|
|
20
20
|
NodeType[NodeType["notequality"] = 15] = "notequality";
|
|
21
|
+
NodeType[NodeType["iDontKnow"] = 16] = "iDontKnow";
|
|
21
22
|
})(NodeType || (NodeType = {}));
|
|
22
23
|
//toujours ajouter les ids en fin de liste (youpi c'est vmt hyper bien codé)
|
|
23
24
|
export var NodeIds;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Node, NodeIds, NodeType } from "../node.js";
|
|
2
|
+
import { AlgebraicNode, SimplifyOptions } from "../algebraicNode.js";
|
|
3
|
+
export declare function isIDontKnowNode(a: Node): a is IDontKnowNode;
|
|
4
|
+
export declare class IDontKnowNode implements AlgebraicNode {
|
|
5
|
+
tex: string;
|
|
6
|
+
type: NodeType;
|
|
7
|
+
isNumeric: boolean;
|
|
8
|
+
constructor(tex: string);
|
|
9
|
+
static keyword(): string;
|
|
10
|
+
toMathString(): string;
|
|
11
|
+
toTex(): string;
|
|
12
|
+
toAllValidTexs(): string[];
|
|
13
|
+
toIdentifiers(): {
|
|
14
|
+
id: NodeIds;
|
|
15
|
+
tex: string;
|
|
16
|
+
};
|
|
17
|
+
toEquivalentNodes(): this[];
|
|
18
|
+
evaluate(): number;
|
|
19
|
+
simplify(_opts?: SimplifyOptions): this;
|
|
20
|
+
toSimplificationTex(opts?: SimplifyOptions): string;
|
|
21
|
+
equals(node: AlgebraicNode): boolean;
|
|
22
|
+
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): AlgebraicNode;
|
|
23
|
+
derivative(): this;
|
|
24
|
+
toSignInequationTex(): string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=iDontKnowNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iDontKnowNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/student/iDontKnowNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAErE,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,aAAa,CAE3D;AACD,qBAAa,aAAc,YAAW,aAAa;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,GAAG,EAAE,MAAM;IAMvB,MAAM,CAAC,OAAO;IAId,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAMf,cAAc;IAGd,aAAa;;;;IAMb,iBAAiB;IAGjB,QAAQ;IAGR,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe;IAGhC,mBAAmB,CAAC,IAAI,CAAC,EAAE,eAAe;IAK1C,MAAM,CAAC,IAAI,EAAE,aAAa;IAG1B,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAIxD,UAAU;IAGV,mBAAmB;CAGpB"}
|