diff --git a/src/main/scala/lisa/kernel/proof/RunningTheory.scala b/src/main/scala/lisa/kernel/proof/RunningTheory.scala
index a67c56156fce6623033c917b3d545e0a35176c7e..0f9c4ce943a8b1976854e559c5d24763976e26ba 100644
--- a/src/main/scala/lisa/kernel/proof/RunningTheory.scala
+++ b/src/main/scala/lisa/kernel/proof/RunningTheory.scala
@@ -107,7 +107,7 @@ class RunningTheory {
     def makePredicateDefinition(label: ConstantPredicateLabel, args: Seq[VariableLabel], phi: Formula): RunningTheoryJudgement[this.PredicateDefinition] = {
         if (belongsToTheory(phi))
             if (!isAcceptedPredicateLabel(label))
-                if (phi.freeVariables.isEmpty && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
+                if (phi.freeVariables.subsetOf(args.toSet) && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
                     val newDef = PredicateDefinition(label, args, phi)
                     predDefinitions.update(label, Some(newDef))
                     RunningTheoryJudgement.ValidJustification(newDef)
@@ -133,7 +133,7 @@ class RunningTheory {
     def makeFunctionDefinition(proof: SCProof, justifications:Seq[Justification], label: ConstantFunctionLabel, args: Seq[VariableLabel], out: VariableLabel, phi: Formula): RunningTheoryJudgement[this.FunctionDefinition] = {
         if (belongsToTheory(phi))
             if (!isAcceptedFunctionLabel(label))
-                if (phi.freeVariables.isEmpty && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
+                if (phi.freeVariables.subsetOf(args.toSet + out) && phi.schematicFunctions.isEmpty && phi.schematicPredicates.isEmpty)
                     if (proof.imports.forall(i => justifications.exists( j => isSameSequent(i, sequentFromJustification(j)))))
                         val r = SCProofChecker.checkSCProof(proof)
                         r match {