From bca3a7ff1aa63e7ddc6e90bf581ecdf32c1683f6 Mon Sep 17 00:00:00 2001
From: Himess <95512809+Himess@users.noreply.github.com>
Date: Mon, 6 Oct 2025 16:41:39 +0300
Subject: [PATCH] docs: fix broken links
---
.../docs/circom-language/code-quality/code-assertion.md | 2 +-
mkdocs/docs/circom-language/control-flow.md | 4 ++--
mkdocs/docs/circom-language/data-types.md | 2 +-
mkdocs/docs/circom-language/signals.md | 2 +-
mkdocs/docs/circom-language/variables-and-mutability.md | 2 +-
mkdocs/docs/getting-started/compiling-circuits.md | 6 +++---
mkdocs/docs/getting-started/computing-the-witness.md | 2 +-
mkdocs/docs/getting-started/proving-circuits.md | 4 ++--
mkdocs/docs/getting-started/writing-circuits.md | 4 ++--
mkdocs/docs/more-circuits/more-basic-circuits.md | 8 ++++----
10 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/mkdocs/docs/circom-language/code-quality/code-assertion.md b/mkdocs/docs/circom-language/code-quality/code-assertion.md
index 37a5cf2b2..7438947c0 100644
--- a/mkdocs/docs/circom-language/code-quality/code-assertion.md
+++ b/mkdocs/docs/circom-language/code-quality/code-assertion.md
@@ -4,7 +4,7 @@
This statement introduces conditions to be checked. Here, we distinguish two cases depending on if **bool_expression** is unknown at compilation time:
-- If the assert statement depends on a control flow with only known conditions (see [Unknowns](../../circom-insight/unknowns)) and the **bool_expression** is known (e.g., if it only depends on the value of template parameters or field constants), the assert is evaluated in compilation time. If the result of the evaluation is false, then the compilation fails. Consider the next piece of code:
+- If the assert statement depends on a control flow with only known conditions (see [Unknowns](../../circom-insight/unknowns.md)) and the **bool_expression** is known (e.g., if it only depends on the value of template parameters or field constants), the assert is evaluated in compilation time. If the result of the evaluation is false, then the compilation fails. Consider the next piece of code:
```
template A(n) {
diff --git a/mkdocs/docs/circom-language/control-flow.md b/mkdocs/docs/circom-language/control-flow.md
index a72c78d3e..854de6c0c 100644
--- a/mkdocs/docs/circom-language/control-flow.md
+++ b/mkdocs/docs/circom-language/control-flow.md
@@ -47,7 +47,7 @@ while(i < 100){
}
```
-**Important**: when constraints are generated in any block inside an if-then-else or loop statement, the condition cannot be unknown (see [Unknowns](../circom-insight/unknowns)). This is because the constraint generation must be unique and cannot depend on unknown input signals.
+**Important**: when constraints are generated in any block inside an if-then-else or loop statement, the condition cannot be unknown (see [Unknowns](../circom-insight/unknowns.md)). This is because the constraint generation must be unique and cannot depend on unknown input signals.
In case the expression in the condition is unknown and some constraint is generated, the compiler will generate the next error message: "_There are constraints depending on the value of the condition and it can be unknown during the constraint generation phase_".
@@ -112,7 +112,7 @@ template wrong(){
This template produces a compilation error, since the value of variable `t` involved in the last constraint depends on the unknown value of variable `in`.
-The control flow of the computations is like in other imperative languages, but the [instantiation of components](../templates-and-components) may not follow the sequential structure of the code because component instantiation will not be triggered until all input signals have a concrete value assigned.
+The control flow of the computations is like in other imperative languages, but the [instantiation of components](../templates-and-components.md) may not follow the sequential structure of the code because component instantiation will not be triggered until all input signals have a concrete value assigned.
```text
template mult(){
diff --git a/mkdocs/docs/circom-language/data-types.md b/mkdocs/docs/circom-language/data-types.md
index d84310a80..b7c5d1270 100644
--- a/mkdocs/docs/circom-language/data-types.md
+++ b/mkdocs/docs/circom-language/data-types.md
@@ -2,7 +2,7 @@
The basic var types in circom are:
-* **Field element values**: integer values modulo the prime number _p_ (see [Signals](../signals)). This is the default type for all signals and basic variables.
+* **Field element values**: integer values modulo the prime number _p_ (see [Signals](../signals.md)). This is the default type for all signals and basic variables.
* **Arrays**: they can hold a finite number of elements (known at compilation time) of the same type (signal, var, or the same type of components or arrays again). The elements are numbered from zero on and can be accessed using the corresponding index of their position. Array access is made using square brackets. Declaration of an array of a given type is made by adding \[\] aside of the variable identifier and including the size between the brackets (which should be defined using constant values and/or numeric parameters of templates).
The access and the declaration should be consistent with their type and hence we access and declare with m\[i\]\[j\], since m\[i\] is an array. Examples of declarations with and without initialization:
diff --git a/mkdocs/docs/circom-language/signals.md b/mkdocs/docs/circom-language/signals.md
index b47b7cd73..692911df5 100644
--- a/mkdocs/docs/circom-language/signals.md
+++ b/mkdocs/docs/circom-language/signals.md
@@ -102,7 +102,7 @@ template B(){
component main = B();
```
-At compilation time, the content of a signal is always considered unknown (see [Unknowns](/circom-language/circom-insight/unknowns)), even if a constant is already assigned to them. The reason for that is to provide a precise \(decidable\) definition of which constructions are allowed and which are not, without depending on the power of the compiler to detect whether a signal has always a constant value or not.
+At compilation time, the content of a signal is always considered unknown (see [Unknowns](/circom-language/circom-insight/unknowns.md)), even if a constant is already assigned to them. The reason for that is to provide a precise \(decidable\) definition of which constructions are allowed and which are not, without depending on the power of the compiler to detect whether a signal has always a constant value or not.
```text
pragma circom 2.0.0;
diff --git a/mkdocs/docs/circom-language/variables-and-mutability.md b/mkdocs/docs/circom-language/variables-and-mutability.md
index 69dbfbecf..d41e0401e 100644
--- a/mkdocs/docs/circom-language/variables-and-mutability.md
+++ b/mkdocs/docs/circom-language/variables-and-mutability.md
@@ -6,7 +6,7 @@ Variables are identifiers that hold non-signal data and are mutable. Variables a
var x;
```
-They hold either numerical values of the field or arithmetic expressions when they are used to build constraints (see [Constraint Generation](../constraint-generation)). They can be named using a variable identifier or can be stored in arrays.
+They hold either numerical values of the field or arithmetic expressions when they are used to build constraints (see [Constraint Generation](../constraint-generation.md)). They can be named using a variable identifier or can be stored in arrays.
Variable assignment is made using the equal symbol `=`. Declarations may also include an initialization, as in the following examples:
diff --git a/mkdocs/docs/getting-started/compiling-circuits.md b/mkdocs/docs/getting-started/compiling-circuits.md
index 48650600f..f6ba9aec9 100644
--- a/mkdocs/docs/getting-started/compiling-circuits.md
+++ b/mkdocs/docs/getting-started/compiling-circuits.md
@@ -53,7 +53,7 @@ circom --help
Path to a circuit with a main component [default: ./circuit.circom]
```
-We created a template called `Multiplier2` in [Writing our first circuit](../writing-circuits).
+We created a template called `Multiplier2` in [Writing our first circuit](../writing-circuits.md).
However, to actually create a circuit, we have to create an instance of this template. To do so, create a file with the following content:
```text
@@ -81,8 +81,8 @@ circom multiplier2.circom --r1cs --wasm --sym --c
With these options we generate three types of files:
-* `--r1cs`: it generates the file `multiplier2.r1cs` that contains the [R1CS constraint system](../../background/background#rank-1-constraint-system) of the circuit in binary format.
-* `--wasm`: it generates the directory `multiplier2_js` that contains the `Wasm` code (multiplier2.wasm) and other files needed to generate the [witness](../../background/background#witness).
+* `--r1cs`: it generates the file `multiplier2.r1cs` that contains the [R1CS constraint system](../../background/background.md#rank-1-constraint-system) of the circuit in binary format.
+* `--wasm`: it generates the directory `multiplier2_js` that contains the `Wasm` code (multiplier2.wasm) and other files needed to generate the [witness](../../background/background.md#witness).
* `--sym` : it generates the file `multiplier2.sym` , a symbols file required for debugging or for printing the constraint system in an annotated mode.
* `--c` : it generates the directory `multiplier2_cpp` that contains several files (multiplier2.cpp, multiplier2.dat, and other common files for every compiled program like main.cpp, MakeFile, etc) needed to compile the C++ code to generate the witness. By default, this option generates an asm file that is incompatible with some architectures. To avoid producing asm files, the flag `--no_asm` must be activated.
diff --git a/mkdocs/docs/getting-started/computing-the-witness.md b/mkdocs/docs/getting-started/computing-the-witness.md
index 753529723..22f20195b 100644
--- a/mkdocs/docs/getting-started/computing-the-witness.md
+++ b/mkdocs/docs/getting-started/computing-the-witness.md
@@ -9,7 +9,7 @@ description: >-
Before creating the proof, we need to calculate all the signals of the circuit that match all the constraints of the circuit. For that, we will use the `Wasm` module generated by`circom` that helps to do this job. It can also be done with the `C++` code in a similar way (see below).
-Let us start with the `Wasm` code. Using the generated `Wasm` binary and three JavaScript files, we simply need to provide a file with the inputs and the module will execute the circuit and calculate all the intermediate signals and the output. The set of inputs, intermediate signals and output is called [witness](../../background/background#witness).
+Let us start with the `Wasm` code. Using the generated `Wasm` binary and three JavaScript files, we simply need to provide a file with the inputs and the module will execute the circuit and calculate all the intermediate signals and the output. The set of inputs, intermediate signals and output is called [witness](../../background.md/background#witness).
In our case, we want to prove that we are able to factor the number 33. So, we assign `a = 3` and `b = 11`.
diff --git a/mkdocs/docs/getting-started/proving-circuits.md b/mkdocs/docs/getting-started/proving-circuits.md
index 10f0f57c9..5b2ba2f85 100644
--- a/mkdocs/docs/getting-started/proving-circuits.md
+++ b/mkdocs/docs/getting-started/proving-circuits.md
@@ -7,13 +7,13 @@ contains all the computed signals and, a file with extension .r1cs that contains
Now, we will use the `snarkjs` tool to generate and validate a proof for our input. In particular, using the multiplier2, **we will prove that we are able to provide the two factors of the number 33**. That is, we will show that we know two integers `a` and `b` such that when we multiply them, it results in the number 33.
We are going to use the [Groth16](https://eprint.iacr.org/2016/260) zk-SNARK protocol.
-To use this protocol, you will need to generate a [trusted setup](../../background/background#trusted-setup).
+To use this protocol, you will need to generate a [trusted setup](../../background/background.md#trusted-setup).
**Groth16 requires a per circuit trusted setup**. In more detail, the trusted setup consists of 2 parts:
- The powers of tau, which is independent of the circuit.
- The phase 2, which depends on the circuit.
-Next, we provide a very basic ceremony for creating the trusted setup and we also provide the basic commands to create and verify [Groth16](https://eprint.iacr.org/2016/260) proofs. Review the related [Background](../../background/background) section and check [the snarkjs tutorial](https://github.com/iden3/snarkjs) for further information.
+Next, we provide a very basic ceremony for creating the trusted setup and we also provide the basic commands to create and verify [Groth16](https://eprint.iacr.org/2016/260) proofs. Review the related [Background](../../background/background.md) section and check [the snarkjs tutorial](https://github.com/iden3/snarkjs) for further information.
## Powers of Tau
diff --git a/mkdocs/docs/getting-started/writing-circuits.md b/mkdocs/docs/getting-started/writing-circuits.md
index e3a5ac689..1836aed84 100644
--- a/mkdocs/docs/getting-started/writing-circuits.md
+++ b/mkdocs/docs/getting-started/writing-circuits.md
@@ -7,7 +7,7 @@ description: >-
# Writing circuits
-`circom` allows programmers to define the [constraints](../../circom-language/constraint-generation) that define the arithmetic circuit. All constraints must be of the form A\*B + C = 0, where A, B and C are linear combinations of signals. More details about these equations can be found [here](../../circom-language/constraint-generation).
+`circom` allows programmers to define the [constraints](../../circom-language/constraint-generation.md) that define the arithmetic circuit. All constraints must be of the form A\*B + C = 0, where A, B and C are linear combinations of signals. More details about these equations can be found [here](../../circom-language/constraint-generation.md).
The arithmetic circuits built using `circom` operate on signals. Let us define our first circuit that simply multiplies two input signals and produces an output signal.
@@ -30,6 +30,6 @@ template Multiplier2 () {
First, the `pragma` instruction is used to specify the compiler version. This is to ensure that the circuit is compatible with the compiler version indicated after the `pragma` instruction. Otherwise, the compiler will throw a warning.
-Then, we use the reserved keyword `template` to define the shape of a new circuit, called `Multiplier2`. Now, we have to define its [signals](../../circom-language/signals). Signals can be named with an identifier, e.g., `a, b, c.` In this circuit, we have two input signals`a, b` and an output signal `c`. Finally, we use `<==` to set that the value of `c` is the result of multiplying the values of `a` and `b`. Equivalently, we could have also used the operator `==>`, e.g., `a * b ==> c`.
+Then, we use the reserved keyword `template` to define the shape of a new circuit, called `Multiplier2`. Now, we have to define its [signals](../../circom-language/signals.md). Signals can be named with an identifier, e.g., `a, b, c.` In this circuit, we have two input signals`a, b` and an output signal `c`. Finally, we use `<==` to set that the value of `c` is the result of multiplying the values of `a` and `b`. Equivalently, we could have also used the operator `==>`, e.g., `a * b ==> c`.
Let us notice that in each template, we first declare its signals, and after that, the associated constraints.
diff --git a/mkdocs/docs/more-circuits/more-basic-circuits.md b/mkdocs/docs/more-circuits/more-basic-circuits.md
index 2d66f5d61..fdbcdbb41 100644
--- a/mkdocs/docs/more-circuits/more-basic-circuits.md
+++ b/mkdocs/docs/more-circuits/more-basic-circuits.md
@@ -41,7 +41,7 @@ component main = Multiplier3();
As expected, we first declare three input signals `in1, in2, in3,` and an output signal `out` and two instances of `Multiplier2` . Instantiations of templates are done using the keyword `component`. We need an instance `mult1` to multiply `in1` and `in2`. In order to assign the values of the input signals of `mult1` we use the dot notation `"."`. Once `mult1.in1` and `mult1.in2` have their values set, then the value of `mult1.out` is computed. This value can be now used to set the input value of `mult2` of the second instance of `Multiplier2`to multiply `in1*in2` and `in3` obtaining the final result `in1*in2*in3`.
-Finally, every execution starts from an initial [main component](../../circom-language/the-main-component) defined as follows.
+Finally, every execution starts from an initial [main component](../../circom-language/the-main-component.md) defined as follows.
```text
component main {public [in1,in2,in3]} = Multiplier3();
@@ -52,7 +52,7 @@ In circom, all output signals of the main component are public (and cannot be ma
## Extending our multiplier to N inputs
-When defining a template, we can use [parameters](../../circom-language/templates-and-components) to build generic circuits. These parameters must have a [known](../../circom-language/circom-insight/unknowns) value at the moment of the instantiation of the template. Following up the previous example, we can implement an N-input multiplier, where `N` is a parameter.
+When defining a template, we can use [parameters](../../circom-language/templates-and-components.md) to build generic circuits. These parameters must have a [known](../../circom-language/circom-insight/unknowns.md) value at the moment of the instantiation of the template. Following up the previous example, we can implement an N-input multiplier, where `N` is a parameter.
```text
pragma circom 2.0.0;
@@ -79,7 +79,7 @@ template MultiplierN (N){
component main = MultiplierN(4);
```
-In addition to the parameter`N`, two well-known concepts appear in this fragment of code: [arrays](../../circom-language/data-types) and [integer variables](../../circom-language/data-types).
+In addition to the parameter`N`, two well-known concepts appear in this fragment of code: [arrays](../../circom-language/data-types.md) and [integer variables](../../circom-language/data-types.md).
As we have seen for a 3-input multiplier, we need 3 input signals and 2 components of `Multiplier2`. Then, for an N-input multiplier, we need an N-dimensional array of input signals and an \(N-1\)-dimensional array of components of `Multiplier2`.
@@ -182,7 +182,7 @@ component main = binaryCheck();
After declaring the signals of the circuit, we use the operator `===`to introduce the constraint `in * (in -1) = 0`. The solutions of this constraint are `in = 0` and `in = 1`. This means that the constraint has solution if and only if the input signal is binary.
-The instruction `out <== in` not only assigns the value of signal `in` to signal `out`, but it also adds the constraint `out = in` to the set of constraints that define the circuit. Then, when both constraints have solution, it is guaranteed that the output signal is binary. Sometimes, we only want to assign the value of a signal but not adding the corresponding constraint. In this case, we will use the operator `<--` and `-->`. The differences between `<--/-->` and `<==/==>` are described [here](../../circom-language/signals).
+The instruction `out <== in` not only assigns the value of signal `in` to signal `out`, but it also adds the constraint `out = in` to the set of constraints that define the circuit. Then, when both constraints have solution, it is guaranteed that the output signal is binary. Sometimes, we only want to assign the value of a signal but not adding the corresponding constraint. In this case, we will use the operator `<--` and `-->`. The differences between `<--/-->` and `<==/==>` are described [here](../../circom-language/signals.md).
## Writing a logic gate AND with two inputs