## 2 Materials and Methods  
### Research Methodology  
Fuzzy sets make it possible to describe phenomena and regularities that can be characterized as fuzzy. In the analyzed case, these were qualitative factors, such as the impact of legal regulations on Poland's energy security. These factors are intuitively understandable, but their interpretation may be ambiguous. Due to the vague nature of this factor, a formal inference mechanism cannot be used. Since qualitative factors, such as the impact of legal regulations, will have a significant impact on shaping energy security in Poland, fuzzy sets were used to take them into account in the analysis. Fuzzy modelling is based on expert knowledge. It may be subconscious, so it is difficult to obtain directly. The most common way to obtain it is to observe the work and reactions of an expert when handling a process. Conscious knowledge can be captured directly and formulated into an explicit record. The expert's knowledge about the process is called the mental model [33]. A diagram illustrating the process of creating a fuzzy linguistic model of a real system is shown in Figure 1.  
In a similar way as in the case of creating an model of an empirical process, activities can be carried out to describe (using expert knowledge) the static impact of one quantity on another quantity. In such a case, the expert's knowledge results from experience in conducting research and observing the impact of given quantities and parameters on other quantities and parameters. Conducting an interview with an expert allows to obtain their explicit knowledge. This can be achieved by using a survey and questions formulated in the form of verbal rules defining the input and output relationships of the model being sought. To develop a fuzzy model, a survey of experts' opinions was conducted on the assessment of the impact of demand for primary energy (\(ZEP\)) and rare earth elements (\(ZREE\)) on Poland's energy security indicators in light of legislation in this area (the survey form is included in the Supplementary Material). The experts were selected according to their knowledge of the analyzed phenomenon. They were exclusively professors. The group of experts included 60% women, and the age range of the experts was 40-65 years. The survey included three forms containing factors used to analyze the level of the energy security index if the legal provisions in force in Poland affect security in the following ways: neutral, negative, or positive. The energy security index takes values from the set of low, medium, and high, where low means a negative assessment, high means a positive assessment, and medium means a neutral assessment. In addition, the study took into account factors such as the following:  
* Primary energy--energy obtained directly from natural resources (renewable and non-renewable). The energy demand assumed in the survey may be:
* Small, for example, due to an increase in the level of energy efficiency, the use of energy-efficient machines and equipment in industry, or an increase in energy prices. Figure 1: The process of creating a fuzzy linguistic model of an empirical system. Source: [33]. * Average, remaining at the current level. * High--as a result of increased demand for energy caused by, for example, dynamic economic growth, natural increase, or falling energy prices. For the primary energy demand, the following values were adopted: low--100, medium--106, and high --113 GJ/capita, marked in surveys and Tables 1-3 as M, S, and D, respectively. The values were obtained by building the ARIMA model and the confidence interval for the determined forecasts. * REEs--rare earth elements, necessary in the process of producing renewable energy technologies such as wind turbines and energy storage. They are classified as critical raw materials due to their limited availability and lack of substitution. The demand for REEs assumed in the survey may be:
* Small, e.g., due to a decline in interest in renewable energy sources such as wind energy or energy storage.